W3cubDocs

/Octave

2.4.4 Letting Readline Type for You

The following commands allow Octave to complete command and variable names for you.

TAB

Attempt to do completion on the text before the cursor. Octave can complete the names of commands and variables.

M-?

List the possible completions of the text before the cursor.

val = completion_append_char ()
old_val = completion_append_char (new_val)
completion_append_char (new_val, "local")

Query or set the internal character variable that is appended to successful command-line completion attempts.

The default value is " " (a single space).

When called from inside a function with the "local" option, the variable is changed locally for the function and any subroutines it calls. The original variable value is restored when exiting the function.

completion_matches (hint)

Generate possible completions given hint.

This function is provided for the benefit of programs like Emacs which might be controlling Octave and handling user input. The current command number is not incremented when this function is called. This is a feature, not a bug.

© 1996–2018 John W. Eaton
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.
https://octave.org/doc/interpreter/Commands-for-Completion.html