From cbb5b578b881b01c570e882088bd0869bea15971 Mon Sep 17 00:00:00 2001 From: Benjamin Asbach Date: Sun, 3 May 2020 11:46:13 +0200 Subject: zsh: added option to enable compatibility with bash's completion system --- nixos/modules/programs/zsh/zsh.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix index 930cc1987a3..049a315c762 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} -- cgit 1.4.1