DEV Community

Discussion on: Ctrl+R Autocomplete with Bash is a Life Saver

Collapse
 
tbodt profile image
tbodt

For me, what's even better than Ctrl-R is the Fish shell. In Fish, you type something that you want to search for in your history and then press up, and it goes back through your history and only shows commands that match what you typed. Your shell configuration looks pretty bare-bones from the screenshot, so you might also appreciate the syntax highlighting and very high-quality autocomplete.

The website is at fishshell.com. If you have Homebrew, you can install it with brew install fish.

Collapse
 
michaelhazani profile image
Michael Hazani

yup. I've been using Fish since I started programming and I fail to see why it's not omnipresent. One you go fish you never go back.

Collapse
 
jerbiahmed profile image
JerbiAhmed

Tried almost every shell out there and I can say Fish is just the best

Collapse
 
bezirganyan profile image
Grigor Bezirganyan • Edited

It's same for zsh with ohmyzsh, just write the start and up up :)

Collapse
 
tbodt profile image
tbodt

The thing I don't like about zsh is you need a whole pile of custom code such as ohmyzsh and its plugins, which really slow it down. All the cool things about fish are built in, and written in C++.

Thread Thread
 
bezirganyan profile image
Grigor Bezirganyan

I've never used fish, so I think I will give it a try!

Thread Thread
 
gcorrel profile image
gcorrel

And who says zsh's plugins slows its functionality down? It even works better and faster with its plugins + OhMyZsh.

Collapse
 
ben profile image
Ben Halpern

Thanks for the tip. I'll look into it. If you're interested in breaking this out into your own post with an intro + tips on fish, and why you use it, I think that would be useful for folks.

Collapse
 
oktayacikalin profile image
Oktay Acikalin

I'm also a heavy fish user. Perhaps we should write something for fish and zsh?

Thread Thread
 
ben profile image
Ben Halpern

Do it!

Collapse
 
shavs profile image
Stephen Shave • Edited

This is also in Bash, but requires a little bit of config. Put this into your ~/.inputrc file:

"\e[A":history-search-backward
"\e[B":history-search-forward
Enter fullscreen mode Exit fullscreen mode

This emulates the functionality of Oh My Zsh, where if you type a letter or word, then press up or down, it will search through the .bash_history file.

The only thing I miss from Oh My Zsh is a "visual selector" for files, by tabbing through a virtual list, and ignoring cases when tabbing to a folder.