Next: Diary and Echo Commands, Previous: Customizing readline, Up: Command Line Editing
The following variables are available for customizing the appearance of the command-line prompts. Octave allows the prompt to be customized by inserting a number of backslash-escaped special characters that are decoded as follows:
Query or set the primary prompt string. When executing interactively, Octave displays the primary prompt when it is ready to read a command.
The default value of the primary prompt string is
"\s:\#> "
. To change it, use a command likeoctave:13> PS1 = "\\u@\\H> "which will result in the prompt `boris@kremvax> ' for the user `boris' logged in on the host `kremvax.kgb.su'. Note that two backslashes are required to enter a backslash into a double-quoted character string. See Strings.
See also: PS1, PS2.
Query or set the secondary prompt string. The secondary prompt is printed when Octave is expecting additional input to complete a command. For example, if you are typing a for loop that spans several lines, Octave will print the secondary prompt at the beginning of each line after the first. The default value of the secondary prompt string is
"> "
.See also: PS1, PS4.
Query or set the character string used to prefix output produced when echoing commands when
echo_executing_commands
is enabled. The default value is"+ "
. See Invoking Octave, for a description of--echo-commands
.See also: echo_executing_commands, PS1, PS2.