Alex Rivera | Logout

bash/readline equivalent of escape-dot in vi-mode

Asked 2011-07-27T03:51:23.403
11

Having recently switched to vi-mode in bash, the one thing I miss is esc . to get the last argument of the last command.

I know about ctrl _, but I always end up hitting ctrl - instead.

Is there another vi-mode equivalent for this?

Edit
Report

1 Answer

2

I always used alt . to get the last argument of the last command.

Also, the !$ will give you the last argument of the last command executed. There are a bunch of cool things you can do with the exclamation point, just check out the man page for bash and search for History Expansion.

answered 2011-07-27T04:28:20.543

Your Answer