Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Fish Shell has a lot of cool feature but lack of `ctrl-r` functionality is preventing me from using it full time.


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 :)


Is possible to change the keyboard shortcut? Moving fingers from arrow keys and back is definitely slower than hitting ctrl-r


You can use ^p/^n


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.


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.

[1] https://github.com/junegunn/fzf


Good idea, will try it.


The default mode in fish is Ctrl-R mode, the shortcut is redundant.


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.


Can'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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: