Re:New Features in the Fish Shell
by miguelmota on Tuesday September 29, 2020 @02:54PM
(#24631533)
Fish Shell has a lot of cool feature but lack of `ctrl-r` functionality is preventing me from using it full time.
[ Parent
| on HN ]
You can just type in anything you'd like as when using Ctrl+R and then just press the up arrow key to perform a fuzzy match in your history.
Does fish have its own inputrc ?
I'm sure it uses inputrc or similar, giving you a thing like:
$if mode=emacs
"\e[A": history-search-backward
"\e[B": history-search-forward
$endif
aka, type "fish" and press up arrow to only go through history that starts with "fish"also, how would you configure fish to use something that doesn't lean on arrows? ^r has its own useful power that can be separate from my use-case of arrows mentioned above, if not just bc you don't have to move off the homerow ;)
You can press ^E to complete the current autocompletion, or keep typing a little more to disambiguate if needed.
edit: this originally said ^D, which is EOF, not autocomplete :)
Re:New Features in the Fish Shell
by miguelmota on Wednesday September 30, 2020 @01:02AM
(#24635835)
Is possible to change the keyboard shortcut? Moving fingers from arrow keys and back is definitely slower than hitting ctrl-r
Re:New Features in the Fish Shell
by thrwyoilarticle on Wednesday September 30, 2020 @05:29AM
(#24636941)
You can use ^p/^n
Re:New Features in the Fish Shell
by triceratops on Tuesday September 29, 2020 @04:18PM
(#24632454)
It lacks "ctrl+r" because it does history search even better than bash. It shows auto-suggestions based on your history. I find ctrl+r when I'm in bash kind of annoying, and not as good at searching.
Re:New Features in the Fish Shell
by thrwyoilarticle on Wednesday September 30, 2020 @05:31AM
(#24636950)
And bash lets you accidentally screw up the history, because it's editable by default, and just weird ^p/^n behaviour
I am using fish along with fzf[1] and it makes `ctrl-r` even better.
Re:New Features in the Fish Shell
by miguelmota on Wednesday September 30, 2020 @12:57AM
(#24635809)
Good idea, will try it.
Re:New Features in the Fish Shell
by nikisweeting on Tuesday September 29, 2020 @03:43PM
(#24632050)
The default mode in fish is Ctrl-R mode, the shortcut is redundant.
Re:New Features in the Fish Shell
by miguelmota on Wednesday September 30, 2020 @12:57AM
(#24635811)
There's a long issue thread on this spanning since 2013:
https://github.com/fish-shell/fish-shell/issues/602
And to clarify, I understand Fish has autocomplete as good or better than bash but not having the keyboard shortcut as ctrl-r is what's making it hard to get accustomed to since I jump around servers where only bash is available and have to use ctrl-r extensively.