Hacker News new | comments | show | ask | jobs | submit login

In zsh and some bash, you can access command history in a way simpler way:

1) Start typing a command `ssh`

2) Use `up` arrow to go backward in your history

2) Use `down` arrow to go forward in your history




Using arrows is an heresy and should never be taught to anybody.

  1) Replace CapsLock with Ctrl
  2) Use Ctrl-P, Ctrl-N to navigate the commands
Remember: never leave the home row.


People get used to this and start hitting up >20 times to get back to a command they ran a while back. Often they overshoot too and have to scroll back.

It's the weaker little brother to ctrl-r, only useful for commands ran 1,2 invokes ago. ctrl-r is more functional I'd say


To enable that in bash, put this into your .inputrc file

"\e[A": history-search-backward "\e[B": history-search-forward




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

Search: