From 35f19785d9e5207ec9fa1e27a94af943d35c93f6 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Mon, 24 Nov 2008 03:13:20 -0600 Subject: [PATCH] changes to zsh... a few more keybindings plus force a fallback to a simpler term if a more complex one does not exist --- zshrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zshrc b/zshrc index c453a08..058e06a 100644 --- a/zshrc +++ b/zshrc @@ -13,6 +13,9 @@ if [[ ${ZSH_VERSION//.} -gt 420 ]] ; then zle -N self-insert url-quote-magic fi +autoload -Uz edit-command-line +zle -N edit-command-line + # disable core dumps limit coredumpsize 0 @@ -61,6 +64,12 @@ elif ( which gdircolors &> /dev/null ) ; then eval $(gdircolors -b $([ -f /etc/DIR_COLORS ] && echo "/etc/DIR_COLORS")) fi +case "${TERM}" in + xterm-256color) + ( infocmp $TERM &> /dev/null ) || export TERM=xterm + ;; +esac + ( which lesspipe &> /dev/null ) && eval $(lesspipe) export LESS=' -R' @@ -122,8 +131,14 @@ alias :wq='exit' # keybindings bindkey -d bindkey -e + bindkey ' ' magic-space +bindkey -M emacs '\ee' edit-command-line + +bindkey -M emacs '' history-incremental-search-forward +bindkey -M emacs '' history-incremental-search-backward + case $TERM in xterm*) bindkey '^[[H' beginning-of-line