Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have it as

    "\e[5~": history-search-backward
    "\e[6~": history-search-forward
This allows you to continue using arrows for absolute chronological history then use PageUp and PageDn for history search.

You could also change it to

    "\e[5~": history-substring-search-backward
    "\e[6~": history-substring-search-forward
if you want to search for a string match anywhere in the command rather than at the beginning. It might be 'substr' rather than 'substring' depending on your Bash version.

Obviously the utility of this depends on your keyboard layout and config, as much as it does on personal preferences.

You can see the full list of commands at https://www.gnu.org/software/bash/manual/html_node/Commands-....



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: