From ed0e40dee87a2ced45e5094a1769151292e08ee0 Mon Sep 17 00:00:00 2001 From: Tobias Happ Date: Tue, 23 Jul 2019 21:40:41 +0200 Subject: [PATCH] zsh: add initExtraBeforeCompInit config option The new initExtraBeforeCompInit option enables the user to inject commands in zshrc before compinit is executed. --- modules/programs/zsh.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index 0359796f0..24c00f674 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -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 .zshrc 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}"