I copied my bashrc and start tweaking it for zsh, but I suddenly found ^P wasn't functioning,It just print a ^P on screen.What could be wrong? Or where should I look at now?
^P not working in zsh, where should I look at?
zsh
You are probably using vi-like key-bindings in zsh without knowing it.Zsh chooses the default keyboard mode by looking at $VISUAL and $EDITOR. If those look vi-ish (like vim), it'll choose vi-like bindings instead of emacs-like bindings.C-p is a binding that's only in the emacs-like key-table by default. You're obviously free to bind keys to whatever you like in the vi-like key-tables as well, as int suggested. But chances are, that you really want emacs mode instead, which you can achieve by doing the following somewhere in your configuration:bindkey -e...preferably before you're doing other keyboard-related configuration.As always, full details about zsh's line editor (zle) can be found in the corresponding section of zsh's reference manual. It describes how the default mode is chosen, as well as which actions are bound to what keys by default in the different key-maps.