Bash – how to recall last argument in bash with vi setting

bashcommand linekeyboard shortcutsvi

I use set -o vi setting in bash. The shorcut Alt+. (recalling last argument of previous command) here doesn't work as in emacs mode, so what is the equivalent for vi?

Best Answer

Add this line after set -o vi:

bind -m vi-command ".":yank-last-argument # or insert-last-argument

Then you can use Alt+. like in emacs-mode.

Or use history expansion, working in both:

!$:p