How can I set up my bash to replace ESCAPE+_ with the last word from the previous command?
Thanks a lot!
|
How can I set up my bash to replace ESCAPE+_ with the last word from the previous command? Thanks a lot! |
||||
|
In the readline library that bash uses for these commands, the command for manipulating the shell history in this fashion is yank-last-arg (M-., M-_) You can use either; or you can bind it to another sequence in your
which would bind it to Mod1p. |
|||
|
|
|
You can also use http://www.gnu.org/software/bash/manual/bashref.html#History-Interaction |
|||
|
bashdoes by default (enter the last word from the previous command when you press the Escape key followed by the _ one. Could you please clarify what you mean? – Stephane Chazelas Jan 27 at 20:37