From: Erik Bernstein Date: Thu, 20 Mar 2014 18:47:11 +0000 (+0100) Subject: zshrc: introduce variable for the compdump file [Closes: issue1275] X-Git-Tag: v0.9.4~1 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=46c723f8057ab12fff51788ba3b347d26d1d9eb4;p=grml-etc-core.git zshrc: introduce variable for the compdump file [Closes: issue1275] Make the completion dump file location configurable by setting COMPDUMPFILE. --- diff --git a/doc/grmlzshrc.t2t b/doc/grmlzshrc.t2t index f7afc41..f6c62a4 100644 --- a/doc/grmlzshrc.t2t +++ b/doc/grmlzshrc.t2t @@ -105,6 +105,9 @@ Import "/etc/default/locale", if set to zero (default). A non zero value causes shell functions to be profiled. The results can be obtained with the zprof builtin command (see zshmodules(1) for details). +: **COMPDUMPFILE** +Specifies the location of the completion dump file. Default: $HOME/.zcompdump. + = FEATURE DESCRIPTION = This is an in depth description of non-standard features implemented by diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 1af7ed7..d032b3e 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 { }