Re:How to navigate directories faster with Bash (2015)
by loulouxiv on Thursday April 22, 2021 @08:56AM
(#26902190)
Which you can type as ALT-.
[ Parent
| on HN ]
Re:How to navigate directories faster with Bash (2015)
by yrro on Thursday April 22, 2021 @09:00AM
(#26902243)
This is the `yank-last-arg` readline comment. Bound to M-. and M-_ by default.
"Insert last argument to the previous command (the last word of the previous history entry). With a numeric argument, behave exactly like yank-nth-arg. Successive calls to yank-last-arg move back through the history list, inserting the last word (or the word specified by the argument to the first call) of each line in turn."
https://tiswww.case.edu/php/chet/readline/readline.html#IDX9...
Its sibling is `yank-nth-arg`, bound to M-C-y. So if you want the 2nd argument from the last command, you can press M-1 followed by M-C-y (yeah, arguments are indexed from 0)...
https://tiswww.case.edu/php/chet/readline/readline.html#IDX9...