1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 13:39:46 +01:00

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."; 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}"