X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=70783ba71aa8ff548d3a510c882a9b7df8403997;hb=5c99d15fe656601918f01636b97e3181c0783357;hp=936c704cfd8ee737c9abf5cf7d1d0e8504a9caf5;hpb=828609514e739f7626c91daddc7dfe7c10807ae9;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 936c704..70783ba 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/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: Sam Okt 21 16:20:30 CEST 2006 [mika] +# Latest change: Mit Okt 25 23:44:27 CEST 2006 [mika] ################################################################################ # This file is sourced only for interactive shells. It # should contain commands to set up aliases, functions, @@ -14,16 +14,19 @@ # {{{ check for version/system # check for versions (compatibility reasons) - is4(){ - [[ $ZSH_VERSION == 4.* ]] && return 0 - return 1 - } - -# current release - is42(){ - [[ $ZSH_VERSION == 4.<2->* ]] && return 0 - return 1 - } + if autoload is-at-least && is-at-least ; then + is4() { is-at-least 4 } + is42() { is-at-least 4.2 } + else + is4(){ + [[ $ZSH_VERSION == 4.* ]] && return 0 + return 1 + } + is42(){ + [[ $ZSH_VERSION == 4.<2->* ]] && return 0 + return 1 + } + fi # grml specific stuff isgrml(){ @@ -36,6 +39,10 @@ return 1 } + isgrmlsmall() { + [[ ${${${(f)"$(' @@ -723,13 +740,16 @@ If you want to use xinit anyway please call \"/usr/bin/xinit\"." # use it e.g. via 'Restart apache2' if [ -d /etc/init.d ] ; then for i in Start Restart Stop Reload ; do - eval "$i() { $SUDO /etc/init.d/\$1 ${i:l} $2 ; }" + eval "$i() { $SUDO /etc/init.d/\$1 ${i:l} \$2 ; }" done # now the completion for this: compctl -g "$(echo /etc/init.d/*(:t))" Start Restart Stop Reload fi # }}} +# make sure our environment is clean regarding colors + for color in BLUE RED GREEN CYAN WHITE ; unset $color + # source another config file if present {{{ if [ -r /etc/zsh/zshrc.local ]; then source /etc/zsh/zshrc.local