X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fskel%2F.zshrc;h=42409f1d4cb17f860fe5330b5f657206589c8832;hb=83c8571605815245c86e29c20c9958b922825a9b;hp=aa1b3e3a83f4ad003c805e46103d7578632971b5;hpb=222006c939694a8d6f20543cfb1d24a37e74e5de;p=grml-etc-core.git diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index aa1b3e3..42409f1 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Don Mai 17 15:08:21 CEST 2007 [mika] +# Latest change: Don Mai 31 17:19:00 CEST 2007 [mika] ################################################################################ # source ~/.zshrc.global {{{ @@ -15,9 +15,16 @@ fi # }}} +# check whether global file has been read {{{ + if [ -z "$ZSHRC_GLOBAL_HAS_BEEN_READ" ] ; then + print 'Warning: global zsh config has not been read'>&2 + fi +# }}} + # autoloading stuff {{{ - # associate types and extensions: - autoload zsh-mime-setup && zsh-mime-setup +# associate types and extensions (be aware with perl scripts and anwanted behaviour!) +# type zsh-mime-setup &>/dev/null || { autoload zsh-mime-setup && zsh-mime-setup } +# alias -s pl='perl -S' # }}} # completion system {{{ @@ -157,6 +164,8 @@ # some useful aliases alias md='mkdir -p' + [ -x $(which ipython) ] && alias ips='ipython -p sh' + # console stuff alias cmplayer='mplayer -vo fbdev' alias fbmplayer='mplayer -vo fbdev -fs -zoom' @@ -171,19 +180,21 @@ [ -d ~/.terminfo/ ] && alias man='TERMINFO=~/.terminfo/ LESS=C TERM=mostlike PAGER=less man' # check whether Debian's package management (dpkg) is running - salias check_dpkg_running="dpkg_running" + type salias &>/dev/null && salias check_dpkg_running="dpkg_running" # work around non utf8 capable software in utf environment - if [ -x /usr/bin/mrxvt ] ; then - isutfenv && [ -n "$LANG" ] && alias mrxvt="LANG=${LANG/(#b)(*)[.@]*/$match[1].iso885915} mrxvt" - fi - - if [ -x /usr/bin/aterm ] ; then - isutfenv && [ -n "$LANG" ] && alias aterm="LANG=${LANG/(#b)(*)[.@]*/$match[1].iso885915} aterm" - fi - - if [ -x /usr/bin/centericq ] ; then - isutfenv && [ -n "$LANG" ] && alias centericq="LANG=${LANG/(#b)(*)[.@]*/$match[1].iso885915} centericq" + if type isutfenv &>/dev/null ; then + if [ -x $(which mrxvt) ] ; then + isutfenv && [ -n "$LANG" ] && alias mrxvt="LANG=${LANG/(#b)(*)[.@]*/$match[1].iso885915} mrxvt" + fi + + if [ -x $(which aterm) ] ; then + isutfenv && [ -n "$LANG" ] && alias aterm="LANG=${LANG/(#b)(*)[.@]*/$match[1].iso885915} aterm" + fi + + if [ -x $(which centericq) ] ; then + isutfenv && [ -n "$LANG" ] && alias centericq="LANG=${LANG/(#b)(*)[.@]*/$match[1].iso885915} centericq" + fi fi # }}} @@ -242,7 +253,7 @@ # Function Usage: doc packagename doc() { cd /usr/share/doc/$1 && ls } _doc() { _files -W /usr/share/doc -/ } - compdef _doc doc + type compdef &>/dev/null && compdef _doc doc # make screenshot of current desktop (use 'import' from ImageMagic) sshot() { @@ -869,7 +880,7 @@ # hl() highlighted less # http://ft.bewatermyfriend.org/comp/data/zsh/zfunct.html - if [[ -x $(which highlight) ]] ; then + if [ -x $(which highlight) ] ; then function hl() { local theme lang theme=${HL_THEME:-""} @@ -1038,7 +1049,7 @@ # Work around ion/xterm resize bug. #if [ "$SHLVL" = 1 ]; then -# if [ -x `which resize 2>/dev/null` ]; then +# if [ -x $(which resize) ]; then # eval `resize