about summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2020-05-19 11:57:25 +0200
committerGitHub <noreply@github.com>2020-05-19 11:57:25 +0200
commit5d0fc0f3b689e30b503d75a5b2457c3da30d24c4 (patch)
tree1f91d0b00a4ad357d5b35cc466dac5f3b3a74419 /nixos/modules/programs
parentade0eba99ddb4f559ce3daea2d073c92eeada5eb (diff)
parentcbb5b578b881b01c570e882088bd0869bea15971 (diff)
downloadnixlib-5d0fc0f3b689e30b503d75a5b2457c3da30d24c4.tar
nixlib-5d0fc0f3b689e30b503d75a5b2457c3da30d24c4.tar.gz
nixlib-5d0fc0f3b689e30b503d75a5b2457c3da30d24c4.tar.bz2
nixlib-5d0fc0f3b689e30b503d75a5b2457c3da30d24c4.tar.lz
nixlib-5d0fc0f3b689e30b503d75a5b2457c3da30d24c4.tar.xz
nixlib-5d0fc0f3b689e30b503d75a5b2457c3da30d24c4.tar.zst
nixlib-5d0fc0f3b689e30b503d75a5b2457c3da30d24c4.zip
Merge pull request #86643 from asbachb/zsh-bash-autocomplete
zsh: added option to enable compatibility with bash's completion system
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/zsh/zsh.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix
index 930cc1987a33..049a315c7622 100644
--- a/nixos/modules/programs/zsh/zsh.nix
+++ b/nixos/modules/programs/zsh/zsh.nix
@@ -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}