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

This commit is contained in:
Benjamin Asbach 2020-05-03 11:46:13 +02:00
parent f17f830897
commit cbb5b578b8

View File

@ -135,6 +135,13 @@ in
type = types.bool;
};
enableBashCompletion = mkOption {
default = false;
description = ''
Enable compatibility with bash's programmable completion system.
'';
type = types.bool;
};
enableGlobalCompInit = mkOption {
default = cfg.enableCompletion;
@ -239,6 +246,11 @@ in
autoload -U compinit && compinit
''}
${optionalString cfg.enableBashCompletion ''
# Enable compatibility with bash's completion system.
autoload -U bashcompinit && bashcompinit
''}
# Setup custom interactive shell init stuff.
${cfge.interactiveShellInit}