Hamilton C shell History Recall

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
!str Last command starting with str
!?str? Last command containing str
%str1%str2% Substitute str2 for str1 in last command. (Used only at the beginning of a line.)



Command Completion

Command completion lets you type just part of a previous command and have the shell fill in the rest. As with filename completion, if no match is found, color highlighting as defined by the MATCHFAIL variable (default is bright red) will be used. Consecutive depressions cause the search to continue on back through the history list.

Command
Meaning
Ctrl-<Enter> Search for the last command that starts with the characters in the previous word.
Alt-<Enter> Search for the last command that contains the characters in the previous word anywhere on the command line.



Previous Topic | Next Topic

Hamilton C shell | Free Updates | Free Demo Software | Win32 Training
Y2K | Customer Testimonials | On-line Hamilton C shell User Guide
Home | Email | Support | Company Profile | Distributors | Links



Copyright © 1997-2001 by Hamilton Laboratories. All rights reserved.
You are visitor number 1921. This page was last modified August 9, 2001.