History Editing

These command-line editor keys allow access to previously entered commands. The GNO shell automatically keeps track of previous commands in what is called a history buffer.

The maximum number of command-lines saved in the history buffer is determined by the shell variable . A default value for this variable is set in the gshrc file that the GNO Installer creates. The lines saved to the history buffer are kept between sessions. That is, when you exit gsh, $SAVEHIST command-lines are saved to your $HOME/history file. When gsh is invoked again, all command-lines saved in the history buffer will be available using history editing keys. See the Section called Description of Predefined Shell Variables in the Chapter called Shell Variables for more information on the HISTORY and SAVEHIST shell variables.

CTRL-P, UP-ARROW

up-history

Fetches the previous command-line. If the current command-line is the first line in the history buffer, the next line fetched will be an empty command-line. If invoked again, the last line in the history buffer will be displayed.

CTRL-N, DOWN-ARROW

down-history

Fetches the next command-line. If the current command-line is the last command line in the history buffer, the next line fetched will be the first command-line in the history buffer.