|
Word Designators
Up
Next
Previous
Word Designators
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
.BR ^ ,
.BR $ ,
.BR * ,
.BR - ,
or
.BR % .
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.
-
0 (zero)
-
The zeroth word. For the shell, this is the command
word.
-
n
-
The nth word.
-
^
-
The first argument. That is, word 1.
-
$
-
The last argument.
-
%
-
The word matched by the most recent `?string?' search.
-
x-\fPy
-
A range of words; `-y' abbreviates `0-y'.
-
*
-
All of the words but the zeroth. This is a synonym
for `1-$\fP'. It is not an error to use
*
if there is just one
word in the event; the empty string is returned in that case.
-
x*
-
Abbreviates x-$\fP.
-
x-
-
Abbreviates x-$\fP like x*\fP, but omits the last word.
If a word designator is supplied without an event specification, the
previous command is used as the event.
Up
Next
Previous