1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

Merge pull request #1066 from antoineco/zsh/fpath

Backport Zsh fpath mangling from NixOS
This commit is contained in:
Emily 2024-09-10 23:31:41 +01:00 committed by GitHub
commit 4c96bd694b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.
@ -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"}