GNU Info

Info Node: (zsh.info)Event Designators

(zsh.info)Event Designators


Next: Word Designators Prev: Overview Up: History Expansion
Enter node , (file) or (file)node

Event Designators
-----------------

An event designator is a reference to a command-line entry in the
history list.  In the list below, remember that the initial `!' in each
item may be changed to another character by setting the histchars
parameter.

!
     Start a history expansion, except when followed by a blank,
     newline, `=' or `('.  If followed immediately by a word designator
     (Note: Word Designators), this forms a history reference with no
     event designator (Note: Overview).

!!
     Refer to the previous command.  By itself, this expansion repeats
     the previous command.

!N
     Refer to command-line N.

!-N
     Refer to the current command-line minus N.

!STR
     Refer to the most recent command starting with STR.

!?STR[?]
     Refer to the most recent command containing STR.  The trailing `?'
     is necessary if this reference is to be followed by a modifier or
     followed by any text that is not to be considered part of STR.

!#
     Refer to the current command line typed in so far.  The line is
     treated as if it were complete up to and including the word before
     the one with the `!#' reference.

!{...}
     Insulate a history reference from adjacent characters (if
     necessary).


automatically generated by info2www version 1.2.2.9