Skip to content
The Shell Reliquary

/static/relicario/en/reliquia/bang-circunflexo/

Menu

SHL-010 · Words

!^

The first argument of the previous line — !$'s shy sibling.

Just as !$ grabs the last word, !^ grabs the first one after the command. The caret points at the beginning, as in vi and in regular expressions.

It shows up less than its sibling because the argument worth reusing is usually the last one. But in two-argument commands — copy, move, rename — the first one is the original.

$ cp original.conf copia.conf
$ vim !^
vim original.conf
Of cp's two arguments, the first.