From: Arkadiusz Miƛkiewicz Date: Wed, 6 Dec 2000 16:41:13 +0000 (+0000) Subject: more zsh magic X-Git-Tag: setup_2_4_4~61 X-Git-Url: http://git.pld-linux.org/?p=projects%2Fsetup.git;a=commitdiff_plain;h=06efe2f9588b1747c7f86da66f6fc75be34f198e more zsh magic Changed files: etc/profile -> 1.15 --- diff --git a/etc/profile b/etc/profile index a9d2073..ae7d015 100644 --- a/etc/profile +++ b/etc/profile @@ -1,4 +1,5 @@ # /etc/profile +# $Id$ # System wide environment and startup programs # Functions and aliases go into the shells dependent startup files @@ -81,7 +82,29 @@ case "$SH" in ;; zsh) PS1='[%n@%m %~]%(!.#.%\$) ' + + # Setup key bindings bindkey -e >/dev/null 2>&1 + bindkey "^[[1~" beginning-of-line >/dev/null 2>&1 + bindkey "^[[H" beginning-of-line >/dev/null 2>&1 + bindkey "^[[4~" end-of-line >/dev/null 2>&1 + bindkey "^[[F" end-of-line >/dev/null 2>&1 + bindkey "^[[3~" delete-char >/dev/null 2>&1 + bindkey "^[[5~" history-search-backward >/dev/null 2>&1 + bindkey "^[[6~" history-search-forward >/dev/null 2>&1 + + case "$TERM" in + aterm) + bindkey '^[[A' up-line-or-history >/dev/null 2>&1 + bindkey '^[[B' down-line-or-history >/dev/null 2>&1 + bindkey '^[[D' backward-char >/dev/null 2>&1 + bindkey '^[[C' forward-char >/dev/null 2>&1 + ;; + esac + # other HISTFILE, zsh uses diffrent fmt + HISTFILE=~/.historyz + # w/o this hist file wont get saved ! + SAVEHIST=$HISTSIZE ;; esac @@ -95,3 +118,5 @@ for i in /etc/profile.d/*.sh ; do done unset i + +# vi:syntax=sh