Hamilton LaboratoriesHamilton C shell 2012User guideLanguage reference

History recall

Oregon Coast

History recall
Previous | Next

Topics

Usage
See also

Usage

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

!n

Command n

!-n

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

!str

Last command starting with str

!?str?

Last command containing str

%str1%str2%

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.