X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=6cd9d24a44ff8eddd34ebfda05257fa407e17d0e;hb=5afe1a231d01ccbdfb747c397f760eb936004814;hp=c5cd34a3a0021e4e39a7100ab2505b524558bfc7;hpb=da81021d37c298023dcb1c075a3960615ebe6915;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index c5cd34a..6cd9d24 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -521,8 +521,6 @@ for var in LANG LC_ALL LC_MESSAGES ; do [[ -n ${(P)var} ]] && export $var done -xsource "/etc/sysconfig/keyboard" - # set some variables if check_com -c vim ; then #v# @@ -603,8 +601,9 @@ if is4 ; then fi # completion system +COMPDUMPFILE=${COMPDUMPFILE:-${ZDOTDIR:-${HOME}}/.zcompdump} if zrcautoload compinit ; then - compinit || print 'Notice: no compinit available :(' + compinit -d ${COMPDUMPFILE} || print 'Notice: no compinit available :(' else print 'Notice: no compinit available :(' function compdef { } @@ -1558,6 +1557,7 @@ if [[ -f ${DIRSTACKFILE} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then fi chpwd() { + if (( $DIRSTACKSIZE <= 0 )) || [[ -z $DIRSTACKFILE ]]; then return; fi local -ax my_stack my_stack=( ${PWD} ${dirstack} ) if is42 ; then @@ -2941,8 +2941,13 @@ modified() { check_com new || alias new=modified # use colors when GNU grep with color-support -#a2# Execute \kbd{grep -{}-color=auto} -(( $#grep_options > 0 )) && alias grep='grep '${grep_options:+"${grep_options[*]}"} +if (( $#grep_options > 0 )); then + o=${grep_options:+"${grep_options[*]}"} + #a2# Execute \kbd{grep -{}-color=auto} + alias grep='grep '$o + alias egrep='egrep '$o + unset o +fi # Translate DE<=>EN # 'translate' looks up fot a word in a file with language-to-language