3 ms·
> !$ - I use this dozens of times a day. It repeats the last argument of the last command. Press ESC then full stop instead. Less key presses.
by seanwilson 9y ago
> !$ - I use this dozens of times a day. It repeats the last argument of the last command.
Press ESC then full stop instead. Less key presses.
- tux1968 9y agoFewer key presses, but doesn't work if you're using vi bindings.
- mkl 9y agoESC _ or M-_ does work in vi mode though (and does the same thing as ESC ./M-.). Search for "yank-last-arg" in the bash manual.
- tux1968 9y agoThank you. Went searching how to do it in Zsh as well when the Zshell Line Editor (zle) is configured in vi mode: $ bindkey -M viins '\e.' insert-last-word Will make ESC-. work from insert mode.