X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=6e70e5f521b3e03719c19a317b1d09499280542b;hb=b3cec3054391bb54542d3a5a4998b626ad6cc322;hp=68b4cea0d714fc8061a80c35e188832a741d51bb;hpb=fdc8e8a0089fc457478464f8cbe4b89a813b27fc;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 68b4cea..6e70e5f 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: Son Okt 08 01:46:31 CEST 2006 [mika] +# Latest change: Son Okt 15 23:20:08 CEST 2006 [mika] ################################################################################ # This file is sourced only for interactive shells. It # should contain commands to set up aliases, functions, @@ -72,6 +72,9 @@ # Search path for the cd comman # cdpath=(.. ~) +# Support our own site-functions + [ -d /etc/zsh/site-functions ] && export FPATH=/etc/zsh/site-functions:$FPATH + # automatically remove duplicates from these arrays typeset -U path cdpath fpath manpath # }}} @@ -129,15 +132,23 @@ fi # we don't want to quote/espace URLs on our own... # avoid 'url-quote-magic: function definition file not found' on some older boxes - if [ -f /usr/share/zsh/$ZSH_VERSION/functions/Zle/url-quote-magic ] ; then - autoload -U url-quote-magic - zle -N self-insert url-quote-magic + if [ -f "/usr/share/zsh/$ZSH_VERSION/functions/Zle/url-quote-magic" ] ; then + autoload -U url-quote-magic && zle -N self-insert url-quote-magic + else + print 'Notice: no url-quote-magic available :(' fi alias run-help >&/dev/null && unalias run-help autoload run-help # use via 'esc-h' - is4 && autoload -U compinit && compinit # completition system +# completion system + is42 && if autoload -U compinit && [ -f "/usr/share/zsh/$ZSH_VERSION/functions/Completion/compinit" ] ; then + compinit + else + print 'Notice: no compinit available :(' + function zstyle { } + function compdef { } + fi is4 && autoload -U zed # use ZLE editor to edit a file or function is4 && zmodload -i zsh/complist @@ -269,7 +280,11 @@ fi # }}} # {{{ set prompt - autoload promptinit ; promptinit # people should be able to use their favourite prompt + if [ -f "/usr/share/zsh/$ZSH_VERSION/functions/Prompts/promptinit" ] ; then + autoload promptinit && promptinit # people should be able to use their favourite prompt + else + print 'Notice: no prompiinit available :(' + fi # precmd() => a function which is executed just before each prompt # precmd () { setopt promptsubst; [[ -o interactive ]] && jobs -l; # run 'NOPRECMD=1 zsh' to disable the precmd + preexec commands