Posts Tagged ‘zsh’

Backward search in your history with ZSH

July 29th, 2009

Bash has a cool native feature, backward search in your history.

Zsh has the same feature but you need enable it.

Here is how to do it :

# Bacward search in the shell history with <C-r>
bindkey ^r  history-incremental-search-backward
setopt hist_ignore_all_dups

Just add the lines above in your ~/.zshrc and then source the file again :

source ~/.zshrc

Now you should be able to search in your history with CTRL+r exactly like you would do with bash.

‘Hope that helps.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)