Skip to content

Commit

Permalink
zsh: prefer Nix completions these from Zsh package
Browse files Browse the repository at this point in the history
Zsh ships some rudimentary completions for programs where upstream also
ships their own completions (e.g., curl). So as not to shadow those
completions, we need to prepend to the fpath instead of appending.

NixOS/nixpkgs@8dad5a2
  • Loading branch information
eigengrau authored and antoineco committed Sep 10, 2024
1 parent 4d59f66 commit 15f64ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/programs/zsh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ in
# Tell zsh how to find installed completions
for p in ''${(z)NIX_PROFILES}; do
fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions)
fpath=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions $fpath)
done
${cfg.shellInit}
Expand Down

0 comments on commit 15f64ef

Please sign in to comment.