Re:Fish: A user-friendly command line shell for macOS, Linux...
by erk__ on Wednesday December 13, 2017 @07:51AM
(#15913882)
With !$ you can use Alt+. to write the arguments from the last command.
[ Parent
| on HN ]
Re:Fish: A user-friendly command line shell for macOS, Linux...
by cben on Sunday December 17, 2017 @12:20PM
(#15946609)
Alt+. is a bash (libreadline really) key.
In fish Alt+Up does something similar, but repeated presses iterates over all words of all commands rather than last words of bash commands. A big improvement is you can type some chars first and then Alt+Up only gets words matching this substring — like Up but word granularity! (Closest bash key is Ctrl+Alt+I)
If you don't mind the differences, and want Alt+. muscle memory to work in fish too, do:
bind \e. history-token-search-backward
(plus Alt+Up doesn't work for me in linux console, Alt+. does)