Merge pull request #86643 from asbachb/zsh-bash-autocomplete

zsh: added option to enable compatibility with bash's completion system
This commit is contained in:
Maximilian Bosch 2020-05-19 11:57:25 +02:00 committed by GitHub
commit 5d0fc0f3b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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}