Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used to use !$ all the time, but these days I tend to go for M-. which inserts the last argument interactively, and cycles through the last argument of all previous commands (but you don't get modifiers like !$:h).

http://www.gnu.org/s/bash/manual/html_node/Commands-For-Hist...

M-C-y (yank-nth-arg) works similarly for the first argument of the previous command, but without cycling through all previous commands.

After the more complex modifiers like !$:p, :e, :s/old/new/, etc, before hitting Return I often use M-C-e (shell-expand-line) just to check I got it right.

http://www.gnu.org/s/bash/manual/html_node/Miscellaneous-Com...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: