
*nix shell prefix-restricted history search? - _0ffh
I&#x27;ve got a question about *nix shells. We all now that &quot;cursor up&quot; usually searches through the history. Do you know of any shell where I can type the beginning of a command, and then &quot;cursor up&quot; will search history only through the entries which start with what I have typed in already?
======
ergl
You can set up your terminal to do this for you, see
[https://unix.stackexchange.com/a/402398](https://unix.stackexchange.com/a/402398)

------
yesenadam
Bash can do that, with Ctrl-r. Press Ctrl-r, then type beginning of command,
then press Ctrl-r repeatedly to go back through history.

[https://www.digitalocean.com/community/tutorials/how-to-
use-...](https://www.digitalocean.com/community/tutorials/how-to-use-bash-
history-commands-and-expansions-on-a-linux-vps)

That page also deals with stuff like getting bash not to delete history with
each session, so searching history can be more useful.

