X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=fc970625a0d3c65846a17a224ae341b734958d11;hb=1317ff557566fba644ea519f643f951e68adbc0e;hp=bd8ab85e5a4c4d717453bc70b085cea4e850ef9b;hpb=57254cb4b9a8321eaec6e68d84b1e484bdb1790e;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index bd8ab85..fc97062 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -601,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 { } @@ -769,7 +770,7 @@ grmlcomp() { # use generic completion system for programs not yet defined; (_gnu_generic works # with commands that provide a --help option with "standard" gnu-like output.) - for compcom in cp deborphan df feh fetchipac head hnb ipacsum mv \ + for compcom in cp deborphan df feh fetchipac gpasswd head hnb ipacsum mv \ pal stow tail uname ; do [[ -z ${_comps[$compcom]} ]] && compdef _gnu_generic ${compcom} done; unset compcom @@ -1556,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 @@ -2939,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