5 ms·
Fish Shell has a lot of cool feature but lack of `ctrl-r` functionality is preventing me from using it full time.
by miguelmota 6y ago
Fish Shell has a lot of cool feature but lack of `ctrl-r` functionality is preventing me from using it full time.
- brinox 6y agoYou 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.
- grimgrin 6y agoDoes 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 ;)
- snazz 6y agoYou 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 :)
- miguelmota 6y agoIs possible to change the keyboard shortcut? Moving fingers from arrow keys and back is definitely slower than hitting ctrl-r
- thrwyoilarticle 6y agoYou can use ^p/^n
- krisgenre 6y agoI am using fish along with fzf[1] and it makes `ctrl-r` even better. [1] https://github.com/junegunn/fzf https://github.com/junegunn/fzf
- miguelmota 6y agoGood idea, will try it.
- fimdomeio 6y agoCan't remember if it's something special I did with my fish config but ctrl+r works for me and is actually better than bash.
- nikisweeting 6y agoThe default mode in fish is Ctrl-R mode, the shortcut is redundant.
- triceratops 6y agoIt 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.
- thrwyoilarticle 6y agoAnd bash lets you accidentally screw up the history, because it's editable by default, and just weird ^p/^n behaviour
- miguelmota 6y agoThere's a long issue thread on this spanning since 2013: https://github.com/fish-shell/fish-shell/issues/602 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.