4 ms·
*nix shell prefix-restricted history search?
I've got a question about *nix shells. We all now that "cursor up" usually searches through the history. Do you know of any shell where I can type the beginning of a command, and then "cursor up" will search history only through the entries which start with what I have typed in already?
- ergl 8y agoYou can set up your terminal to do this for you, see https://unix.stackexchange.com/a/402398 https://unix.stackexchange.com/a/402398
- yesenadam 8y agoBash 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-bash-history-commands-and-expansions-on-a-linux-vps https://www.digitalocean.com/community/tutorials/how-to-use-... That page also deals with stuff like getting bash not to delete history with each session, so searching history can be more useful.