DEV Community

Discussion on: Why I am not switching to ZSH

Collapse
 
flrnd profile image
Florian Rand • Edited

Fish history recall is very simple yet effective:

As in any modern shell, the Up arrow, ↑ recalls whole lines, starting from the last line executed. A single press replaces "!!", later presses replace "!-3" and the like.
If the line you want is far back in the history, type any part of the line and then press Up one or more times. This will constrain the recall to lines that include this text, and you will get to the line you want much faster. This replaces "!vi", "!?bar.c" and the like.

Fish docs

Collapse
 
thomasjunkos profile image
Thomas Junkツ

Thank you for your kind advice and hint to the docs.

Thread Thread
 
flrnd profile image
Florian Rand

No problem! I should thank you because I didn't know about !-3 before reading your comment. I was just sharing my findings :D