zsh: add initExtraBeforeCompInit config option

The new initExtraBeforeCompInit option enables the user to inject
commands in zshrc before compinit is executed.
This commit is contained in:
Tobias Happ 2019-07-23 21:40:41 +02:00 committed by Matthieu Coudron
parent 8b759c24e6
commit ed0e40dee8

View file

@ -215,6 +215,12 @@ in
description = "Environment variables that will be set for zsh session.";
};
initExtraBeforeCompInit = mkOption {
default = "";
type = types.lines;
description = "Extra commands that should be added to <filename>.zshrc</filename> before compinit.";
};
initExtra = mkOption {
default = "";
type = types.lines;
@ -341,6 +347,8 @@ in
${localVarsStr}
${cfg.initExtraBeforeCompInit}
${concatStrings (map (plugin: ''
path+="$HOME/${pluginsDir}/${plugin.name}"
fpath+="$HOME/${pluginsDir}/${plugin.name}"