3 ms·
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
by imp0cat 3y ago
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.
- penguin_booze 3y agoalt + <number> + alt + . should do the same thing. No need for ctrl+alt+y, is there?