From 17876c2cf1d14dd1c0a42b1030d6ada21c899941 Mon Sep 17 00:00:00 2001 From: Tobias Happ Date: Fri, 17 Aug 2018 12:57:33 +0200 Subject: nixos/zsh: Adds enableGlobalCompInit option --- nixos/modules/programs/zsh/zsh.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'nixos/modules/programs/zsh/zsh.nix') diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix index 42d4e1d4ada..0ecf2945a87 100644 --- a/nixos/modules/programs/zsh/zsh.nix +++ b/nixos/modules/programs/zsh/zsh.nix @@ -87,6 +87,19 @@ in type = types.bool; }; + + enableGlobalCompInit = mkOption { + default = cfg.enableCompletion; + description = '' + Enable execution of compinit call for all interactive zsh shells. + + This option can be used if the user wants to extend its + fpath and a custom compinit + call in the local config is required. + ''; + type = types.bool; + }; + }; }; @@ -159,7 +172,7 @@ in fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions) done - ${optionalString cfg.enableCompletion "autoload -U compinit && compinit"} + ${optionalString cfg.enableGlobalCompInit "autoload -U compinit && compinit"} ${cfge.interactiveShellInit} -- cgit 1.4.1