history: History Interaction

1 
1 1.1 History Expansion
1 =====================
1 
1 The History library provides a history expansion feature that is similar
1 to the history expansion provided by 'csh'.  This section describes the
1 syntax used to manipulate the history information.
1 
1    History expansions introduce words from the history list into the
1 input stream, making it easy to repeat commands, insert the arguments to
1 a previous command into the current input line, or fix errors in
1 previous commands quickly.
1 
1    History expansion takes place in two parts.  The first is to
1 determine which line from the history list should be used during
1 substitution.  The second is to select portions of that line for
1 inclusion into the current one.  The line selected from the history is
1 called the "event", and the portions of that line that are acted upon
1 are called "words".  Various "modifiers" are available to manipulate the
1 selected words.  The line is broken into words in the same fashion that
1 Bash does, so that several words surrounded by quotes are considered one
1 word.  History expansions are introduced by the appearance of the
1 history expansion character, which is '!' by default.
1 

Menu