1

In bash, we can use the up and down arrow keys to get the last or nth previous command in history.

Can we do this in zsh?

1 Answers1

2

According to man zshzle you should be able to

  • ctrl+n next history
  • ctrl+p previous history

man zshzle:

down-history (unbound) (^N) (unbound)
       Move to the next event in the history list

up-history (unbound) (^P) (unbound)
       Move to the previous event in the history list.

Oh-my-zsh

Also, not sure if you know already, but there is also oh-my-zsh. This customization of zsh does come with down/up as well as previously mentioned ctrl+n/ctrl+p for next/previous in history list, respectively

clarity123
  • 3,539