Word designators are used to select desired words from the event. A ‘:’ separates the event specification from the word designator. It may be omitted if the word designator begins with a ‘^’, ‘$’, ‘*’, ‘-’, or ‘%’. Words are numbered from the beginning of the line, with the first word being denoted by 0 (zero). Words are inserted into the current line separated by single spaces.
For example,
!!
!!:$
!$
.
!fi:2
fi
.
Here are the word designators:
0 (zero)
0
th word. For many applications, this is the command word.
^
$
%
-
y*
0
th. This is a synonym for ‘1-$’.
It is not an error to use ‘*’ if there is just one word in the event;
the empty string is returned in that case.
*
-
If a word designator is supplied without an event specification, the previous command is used as the event.