]> git.pld-linux.org Git - projects/setup.git/commitdiff
more zsh magic
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 6 Dec 2000 16:41:13 +0000 (16:41 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 6 Dec 2000 16:41:13 +0000 (16:41 +0000)
Changed files:
    etc/profile -> 1.15

etc/profile

index a9d2073958a3e8f0b8c5917276bb7753e4a3fc5d..ae7d0155d4082f80c7f8f3e84615a6b071de9fed 100644 (file)
@@ -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
This page took 0.135169 seconds and 4 git commands to generate.