diff options
author | Tobias Happ <tobias.happ@gmx.de> | 2018-08-17 12:57:33 +0200 |
---|---|---|
committer | Tobias Happ <tobias.happ@gmx.de> | 2018-08-19 12:57:06 +0200 |
commit | 17876c2cf1d14dd1c0a42b1030d6ada21c899941 (patch) | |
tree | bfd787488089c95f908e9a28c866a28ffa00b03b /nixos | |
parent | 1d417c39f0200bcf9eed95b428faf3e1bc0802ee (diff) | |
download | nixlib-17876c2cf1d14dd1c0a42b1030d6ada21c899941.tar nixlib-17876c2cf1d14dd1c0a42b1030d6ada21c899941.tar.gz nixlib-17876c2cf1d14dd1c0a42b1030d6ada21c899941.tar.bz2 nixlib-17876c2cf1d14dd1c0a42b1030d6ada21c899941.tar.lz nixlib-17876c2cf1d14dd1c0a42b1030d6ada21c899941.tar.xz nixlib-17876c2cf1d14dd1c0a42b1030d6ada21c899941.tar.zst nixlib-17876c2cf1d14dd1c0a42b1030d6ada21c899941.zip |
nixos/zsh: Adds enableGlobalCompInit option
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/programs/zsh/zsh.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix index 42d4e1d4ada0..0ecf2945a87b 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 + <literal>fpath</literal> and a custom <literal>compinit</literal> + 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} |