about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorThomas Mühlbacher <tmuehlbacher@posteo.net>2024-04-16 20:34:12 +0200
committerThomas Mühlbacher <tmuehlbacher@posteo.net>2024-04-21 20:33:03 +0200
commitdd64d6285889b4d22a2a0c916558488e5d43dbf8 (patch)
tree234b60cb4dd844506be4d2d5174aa918c27ce2df /nixos/modules
parent3ad65e9f48fd31c89121feb6e9c582ff7e4bb664 (diff)
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
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/programs/fzf.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/programs/fzf.nix b/nixos/modules/programs/fzf.nix
index 0e7e519f0436d..66ad7d418de68 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)