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

You can do it in bash too. I have this in my bashrc:

    bind '"^[[1;5A": history-search-backward'
    bind '"^[[1;5B": history-search-forward'
where ^[ is the escape character. This way, crtl-up goes to previous partial match (and up goes to last command as usual). I use it all the time.


I have this to use the arrow keys without any modifier:

    # Use up/down arrows to search on partially typed command
    bind '"\e[A"':history-search-backward
    bind '"\e[B"':history-search-forward
Just type the first letter(s) and use the up/down arrows to scroll through the filtered command history. Incredibly convenient.


I didn't think that was possibile. Thank you.




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

Search: