Skip to content

Commit

Permalink
Merge pull request #1066 from antoineco/zsh/fpath
Browse files Browse the repository at this point in the history
Backport Zsh fpath mangling from NixOS
  • Loading branch information
emilazy authored Sep 10, 2024
2 parents 5b2d8e9 + 15f64ef commit 4c96bd6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/programs/zsh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ in
. ${config.system.build.setEnvironment}
fi
# 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)
done
${cfg.shellInit}
# Read system-wide modifications.
Expand Down Expand Up @@ -182,11 +187,6 @@ in
${config.environment.interactiveShellInit}
${cfg.interactiveShellInit}
# 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)
done
${cfg.promptInit}
${optionalString cfg.enableGlobalCompInit "autoload -U compinit && compinit"}
Expand Down

0 comments on commit 4c96bd6

Please sign in to comment.