Commit dd64d628 authored by Thomas Mühlbacher's avatar Thomas Mühlbacher
Browse files

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
parent 3ad65e9f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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)