Previous: Customizing the Prompt, Up: Command Line Editing [Contents][Index]
Octave’s diary feature allows you to keep a log of all or part of an interactive session by recording the input you type and the output that Octave produces in a separate file.
Record a list of all commands and the output they produce, mixed together just as they appear on the terminal.
Valid options are:
Start recording a session in a file called diary in the current working directory.
Stop recording the session in the diary file.
Record the session in the file named filename.
With no arguments, diary
toggles the current diary state.
See also: history.
Sometimes it is useful to see the commands in a function or script as they are being evaluated. This can be especially helpful for debugging some kinds of problems.
Control whether commands are displayed as they are executed.
Valid options are:
on
Enable echoing of commands as they are executed in script files.
off
Disable echoing of commands as they are executed in script files.
on all
Enable echoing of commands as they are executed in script files and functions.
off all
Disable echoing of commands as they are executed in script files and functions.
With no arguments, echo
toggles the current echo state.
Query or set the internal variable that controls the echo state.
It may be the sum of the following values:
Echo commands read from script files.
Echo commands from functions.
Echo commands read from command line.
More than one state can be active at once. For example, a value of 3 is equivalent to the command echo on all.
The value of echo_executing_commands
may be set by the echo
command or the command line option --echo-commands.
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.
Previous: Customizing the Prompt, Up: Command Line Editing [Contents][Index]