re: Instant +100% command line productivity boost VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION

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

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

:see_no_evil:

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.

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

;-)

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

code of conduct - report abuse