Customizing the Prompt 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:
\t
\d
\n
\s
octave
).
\w
\W
\u
\h
\H
\#
\!
\#
by the
number of commands in the history list when Octave starts.
\$
#
, otherwise a $
.
\nnn
\\
PS1 | Built-in Variable |
The primary prompt string. When executing interactively Octave
displays the primary prompt PS1 when it is ready to read a
command.
The default value of octave:13> PS1 = "\\u@\\H> " which will result in the prompt |
PS2 | Built-in Variable |
The secondary prompt string which is printed when Octave is
expecting additional input to complete a command. For example when
defining a function over several lines Octave will print the value of
PS1 at the beginning of each line after the first. The default
value of PS2 is "> " .
|
PS4 | Built-in Variable |
If Octave is invoked with the --echo-commands option the value of
PS4 is printed before each line of input that is echoed. The
default value of PS4 is "+ " . See Invoking Octave for
a description of --echo-commands .
|