From 46c723f8057ab12fff51788ba3b347d26d1d9eb4 Mon Sep 17 00:00:00 2001 From: Erik Bernstein Date: Thu, 20 Mar 2014 19:47:11 +0100 Subject: [PATCH] zshrc: introduce variable for the compdump file [Closes: issue1275] Make the completion dump file location configurable by setting COMPDUMPFILE. --- doc/grmlzshrc.t2t | 3 +++ etc/zsh/zshrc | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) 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 { } -- 2.1.4