Hamilton LaboratoriesHamilton C shell 2012User guideLanguage reference

History recall

Oregon Coast

History recall
Previous | Next


See also


History recall allows a previous statement to be quickly recalled and re-executed. It's a very fast shorthand, especially in the edit/compile/debug loop or to fix a typo. For convenience, ! is taken as an ordinary character if followed by white space, =, ~ or (.

If you want, you can choose different characters to introduce history references by changing the histchars variable.

Command Meaning
!! Last command

First argument word of last command


Last word of last command


All arguments of last command


Command n


nth command from the last, counting the immediately preceding command as !-0.


Last command starting with str


Last command containing str


Substitute str2 for str1 in last command. Recognized only at the beginning of the command line.

See also

histchars variable
Command completion
Filename completion
Command line editing
Tutorial: History
Tutorial: Filename completion
Tutorial: Command line editing

Previous | Next

Getting started with Hamilton C shell

Hamilton C shell, as it first wakes up.

Getting started with Hamilton C shell

A first few commands.

You can set the screen colors to your taste.

You can set the screen colors to your taste.