X-Git-Url: https://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=etc%2Fzsh%2Fzshrc;h=dfbc02e463dabed0bd1ada4aa5fffec5d94db6b3;hb=83c8571605815245c86e29c20c9958b922825a9b;hp=46d3d64b91994c7bc354e0ab98d8ff2d7274a9a2;hpb=fb0f5303d1e6bc334c009501cbff754b38e8cff9;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 46d3d64..dfbc02e 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: Fre Mai 25 02:03:29 CEST 2007 [mika] +# Latest change: Die Mai 29 16:30:03 CEST 2007 [mika] ################################################################################ # This file is sourced only for interactive shells. It # should contain commands to set up aliases, functions, @@ -40,6 +40,7 @@ printf " rm ${xof}\n\n" printf ' -!- Note, that this message will *not* go away, unless you yourself\n' printf ' -!- resolve the situation manually.\n\n' + BROKEN_COMPLETION_DIR=1 fi unset xof # }}} @@ -151,12 +152,16 @@ # completion functions go to /etc/zsh/completion.d # function files may be put into /etc/zsh/functions.d, from where they # will be automatically autoloaded. - [[ -d /etc/zsh/completion.d ]] && fpath+=( /etc/zsh/completion.d ) - if [[ -d /etc/zsh/functions.d ]] ; then - fpath+=( /etc/zsh/functions.d ) - for func in /etc/zsh/functions.d/[^_]*[^~] ; do - autoload -U ${func:t} - done + if [ -n "$BROKEN_COMPLETION_DIR" ] ; then + print 'Warning: not setting completion directories because broken files have been found.'>&2 + else + [[ -d /etc/zsh/completion.d ]] && fpath+=( /etc/zsh/completion.d ) + if [[ -d /etc/zsh/functions.d ]] ; then + fpath+=( /etc/zsh/functions.d ) + for func in /etc/zsh/functions.d/[^_]*[^~] ; do + autoload -U ${func:t} + done + fi fi # automatically remove duplicates from these arrays @@ -783,8 +788,9 @@ Enjoy your grml system with the zsh!$reset_color" fi } - isgrmlcd && alias su="sudo su" # change to user root - alias tlog="tail -f /var/log/syslog" # take a look at the syslog + isgrmlcd && alias su="sudo -s" # get a root shell + alias llog="$PAGER /var/log/syslog" # take a look at the syslog + alias tlog="tail -f /var/log/syslog" # follow the syslog alias zshskel="source /etc/skel/.zshrc" # source skeleton zshrc fi @@ -1262,5 +1268,9 @@ If you want to use xinit anyway please call \"/usr/bin/xinit\"." fi # }}} +# add variable to be able to check whether the file has been read {{{ + ZSHRC_GLOBAL_HAS_BEEN_READ=1 +# }}} + ## END OF FILE ################################################################# # vim:foldmethod=marker expandtab