3 ms·
escpae-dot (.) also works for this: "It also works to use !$ instead of escape-dot, but that is slightly harder to type, so I don’t use that anymore." Wrote ab
by henrik_w 6y ago
escpae-dot (.) also works for this:
"It also works to use !$ instead of escape-dot, but that is slightly harder to type, so I don’t use that anymore."
Wrote about it here: https://henrikwarne.com/2018/08/11/my-favorite-command-line-shortcuts/ https://henrikwarne.com/2018/08/11/my-favorite-command-line-...
- loulouxiv 6y agoWhich you can type as ALT-.
- yrro 6y agoThis 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#IDX95 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#IDX94 https://tiswww.case.edu/php/chet/readline/readline.html#IDX9...