From dd64d6285889b4d22a2a0c916558488e5d43dbf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BChlbacher?= Date: Tue, 16 Apr 2024 20:34:12 +0200 Subject: [PATCH] nixos/fzf: fix bash with `fuzzyCompletion` put all of fzf initialization after the bash-completions initialization in bashrc, as the upstream project suggests in https://github.com/junegunn/fzf/issues/72 Fixes: #303195 --- nixos/modules/programs/fzf.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/programs/fzf.nix b/nixos/modules/programs/fzf.nix index 0e7e519f0436..66ad7d418de6 100644 --- a/nixos/modules/programs/fzf.nix +++ b/nixos/modules/programs/fzf.nix @@ -15,11 +15,12 @@ in environment.systemPackages = lib.mkIf (cfg.keybindings || cfg.fuzzyCompletion) [ pkgs.fzf ]; programs = { - bash.interactiveShellInit = lib.optionalString cfg.fuzzyCompletion '' + # load after programs.bash.enableCompletion + bash.promptPluginInit = lib.mkAfter (lib.optionalString cfg.fuzzyCompletion '' source ${pkgs.fzf}/share/fzf/completion.bash '' + lib.optionalString cfg.keybindings '' source ${pkgs.fzf}/share/fzf/key-bindings.bash - ''; + ''); zsh = { interactiveShellInit = lib.optionalString (!config.programs.zsh.ohMyZsh.enable)