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:
parent
8b759c24e6
commit
ed0e40dee8
|
@ -215,6 +215,12 @@ in
|
||||||
description = "Environment variables that will be set for zsh session.";
|
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 {
|
initExtra = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
|
@ -341,6 +347,8 @@ in
|
||||||
|
|
||||||
${localVarsStr}
|
${localVarsStr}
|
||||||
|
|
||||||
|
${cfg.initExtraBeforeCompInit}
|
||||||
|
|
||||||
${concatStrings (map (plugin: ''
|
${concatStrings (map (plugin: ''
|
||||||
path+="$HOME/${pluginsDir}/${plugin.name}"
|
path+="$HOME/${pluginsDir}/${plugin.name}"
|
||||||
fpath+="$HOME/${pluginsDir}/${plugin.name}"
|
fpath+="$HOME/${pluginsDir}/${plugin.name}"
|
||||||
|
|
Loading…
Reference in a new issue