DEV Community

Discussion on: Instant +100% command line productivity boost

Collapse
 
mariosant profile image
Marios Antonoudiou

I was about to say that! So much better indeed!

Collapse
 
xavierartot profile image
Xavier Artot • Edited

And what's better with Fish shell?
Thanks!

EDIT: I gave a shot and I love the real autocompletion without plugin :)

Thread Thread
 
mariosant profile image
Marios Antonoudiou

It provides a great experience, right out of the box!

A few sample points that I find really useful:

  • Very nice history search. Type a word and hit up arrow on your keyboard.
  • fish_config - Try executing this :)
  • I prefer the way things are configured. This is a directory inside your ~/.config.
  • Syntax highlighting, colors etc.

Now if you are into scripting, you might find it a bit easier to write your own autocompletion, it did for me for sure ;)

Thread Thread
 
paveltrufi profile image
Pavel Razgovorov

Another thing I use the most is the reverse-i-search, but, instead of typing Ctrl+R and the text I want to search, I just type it and use the arrow keys. The shell looks in the history but matching my query, and the visual result looks much more intuitive :D

And that's just one feature (appart for, for example, the "bobthefish" theme, a must have for using git) out of a large list.

Thread Thread
 
xavierartot profile image
Xavier Artot • Edited

As a vim user I hate the arrow key, I lost some productivity when I moved from the row.

Thread Thread
 
jospoortvliet profile image
Jos Poortvliet

It might be total anathema but... type + arrow keys to search is what I use in bash ;-)

:see_no_evil:

Thread Thread
 
paveltrufi profile image
Pavel Razgovorov

But I think it doesn't work the same way:

In bash, when you use reverse-i-search, you first press Ctrl+R and then you start typing the command you was looking for. While you type, the command is appearing in console. To look for previous commands that also match your query, you press Ctrl+R as many times as you will need in order to you find your command.

In Fish Shell, you just type as you would do in bash when you're in reverse-i-search, and then use the arrow keys to go to the previous commands (you can go back to the following ones of the current you have selected by pressing the down-arrow key, I don't know if that exists in bash). Plus, the query you typed will be highlighted in the current command.

Thread Thread
 
jospoortvliet profile image
Jos Poortvliet

It does work that way - I type, hit arrow-up to cycle through previous times I typed that command. No ctrl-R required.

You put in your .inputrc:

arrow up

"\e[A":history-search-backward

arrow down

"\e[B":history-search-forward

;-)

Thread Thread
 
paveltrufi profile image
Pavel Razgovorov

Wow, I'll try this when I arrive home just for the curiosity xD