12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #
- # Zsh configuration file
- # Since 2006, kolter <kolter@openics.org>
- #
- # This file is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY
- #
- # editor
- export EDITOR="emacs"
- # email address
- export EMAIL="kolter@openics.org"
- # email address for anonymous ftp
- export EMAIL_ADDR=pwet@dev.null
- # redefine PATH
- export PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:/usr/games
- # define personal zsh config directory
- export DOTZSHDIR="$HOME/.zsh.d"
- # checking events on system (users login/logout, etc...)
- watch=(notme)
- LOGCHECK=5
- WATCHFMT="[%T] %n has %a %l from %M"
- # overide insecure stuff with compinit while using 'sudo zsh'
- # my functions (don't forget to modify fpath before call compinit !!)
- [ -z "$SUDO_USER" -a $UID != 0 ] && fpath=($DOTZSHDIR/functions.d $fpath)
- autoload -U zutil
- autoload -U compinit
- autoload -U complist
- compinit
- # override default umask
- umask 0022
- # sourcing resource files
- for f in $DOTZSHDIR/config.d/*.zsh; do
- [ -r "$f" ] && source $f
- done
- # per OS resource file
- local os=$(uname)
- [ -r "$DOTZSHDIR/os.d/${os}.zsh" ] && source "$DOTZSHDIR/os.d/${os}.zsh"
- # using 'sudo zsh'
- if [ "$SUDO_USER" -a $UID = 0 ]; then
- # define root history path
- export HISTFILE="/root/.zsh_history"
-
- # ugly hack : reset some file perms to normal to avoid warnings
- chmod 0644 ~/.zcompdump
- chown $SUDO_USER:$SUDO_USER ~/.zcompdump
- fi
- # sourcing extra file
- [ -r "$DOTZSHDIR/extra.zsh" ] && source "$DOTZSHDIR/extra.zsh"
|