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

Often the shortcuts that people point out in these threads are too niche for me to remember, but that seems like a pretty great one, I’ll try to remember it.


alt + . is easy to remember, but did you know you there is a way to recall any argument from the previous command in bash?

Press Escape, then the number of the argument from the previous command, confirm with Ctrl+Alt+Y.

Example:

  > command arg1 arg2 arg3
Escape, 1, Ctrl+Alt+Y gives you arg1.


alt + <number> + alt + . should do the same thing. No need for ctrl+alt+y, is there?




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

Search: