If invoked with no arguments, history displays a list of commands
that you have executed.
Valid options are:
n-nDisplay only the most recent n lines of history.
-cClear the history list.
-qDon’t number the displayed lines of history. This is useful for cutting and pasting commands using the X Window System.
-r fileRead the file file, appending its contents to the current history list. If the name is omitted, use the default history file (normally ~/.octave_hist).
-w fileWrite the current history to the file file. If the name is omitted, use the default history file (normally ~/.octave_hist).
For example, to display the five most recent commands that you have typed without displaying line numbers, use the command history -q 5.
If invoked with a single output argument, the history will be saved to that argument as a cell string and will not be output to screen.
See also: edit_history, run_history.
Package: octave