You are not logged in.

#1 2008-07-24 15:23:55

print
Member
Registered: 2007-02-27
Posts: 174

zsh: CTRL+R doesn't search history. Why?

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

#2 2008-07-24 16:58:25

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: zsh: CTRL+R doesn't search history. Why?

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

#3 2008-07-24 17:29:03

print
Member
Registered: 2007-02-27
Posts: 174

Re: zsh: CTRL+R doesn't search history. Why?

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

#4 2008-07-24 20:14:32

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: zsh: CTRL+R doesn't search history. Why?

Yes, it's possible, These are my keybindings:

bindkey -v
bindkey '\e[3~' delete-char
bindkey '^R' history-incremental-search-backward

(lambda ())

Offline

#5 2008-07-24 20:28:58

print
Member
Registered: 2007-02-27
Posts: 174

Re: zsh: CTRL+R doesn't search history. Why?

Thanks!  That worked.


% whereis whatis whence which whoami whois who

Offline

Board footer

Powered by FluxBB