You are not logged in.
Title says it all. Just did a fresh install of ZSH and I can't get it to search backwards in the history. Is there a bindkey I need for this? I'm using PuTTY to connect to an Arch box.
P
% whereis whatis whence which whoami whois who
Offline
First, see if PuTTY is actually passing the ^R, by running "cat" and then pressing that button.
By default, zsh has emacs/readline keybindings, including a history search, which you can also set with: bindkey -e
Offline
print@deathstar> cat ~/gits
^R
print@deathstar> grep bindkey ~/.zshrc ~/gits/cases
bindkey -v
bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line
bindkey "\e[5~" beginning-of-history
bindkey "\e[6~" end-of-history
bindkey "\e[3~" delete-char
bindkey "\e[2~" quoted-insert
bindkey "\e[5C" forward-word
bindkey "\eOc" emacs-forward-word
bindkey "\e[5D" backward-word
bindkey "\eOd" emacs-backward-word
bindkey "\e\e[C" forward-word
bindkey "\e\e[D" backward-word
bindkey "^H" backward-delete-word
bindkey "\e[8~" end-of-line
bindkey "\e[7~" beginning-of-line
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line
bindkey '^i' expand-or-complete-prefix
When I change it to bindkey -e it works; however, I want to use the vi bindings. Is it possible to use vi bindings and have history search?
Thanks,
P
Last edited by print (2008-07-24 17:31:10)
% whereis whatis whence which whoami whois who
Offline
Yes, it's possible, These are my keybindings:
bindkey -v
bindkey '\e[3~' delete-char
bindkey '^R' history-incremental-search-backward
(lambda ())
Offline
Thanks! That worked.
% whereis whatis whence which whoami whois who
Offline