zsh: added option to enable compatibility with bash's completion system

Changed files
+12
nixos
modules
programs
zsh
+12
nixos/modules/programs/zsh/zsh.nix
···
type = types.bool;
};
+
enableBashCompletion = mkOption {
+
default = false;
+
description = ''
+
Enable compatibility with bash's programmable completion system.
+
'';
+
type = types.bool;
+
};
enableGlobalCompInit = mkOption {
default = cfg.enableCompletion;
···
${optionalString cfg.enableGlobalCompInit ''
# Enable autocompletion.
autoload -U compinit && compinit
+
''}
+
+
${optionalString cfg.enableBashCompletion ''
+
# Enable compatibility with bash's completion system.
+
autoload -U bashcompinit && bashcompinit
''}
# Setup custom interactive shell init stuff.