mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
zsh: only run shell initialization in /etc/zshenv when RCs are enabled
This commit is contained in:
parent
4b3c0d353b
commit
5fbb7b7637
1 changed files with 11 additions and 9 deletions
|
@ -136,17 +136,19 @@ in
|
||||||
if [ -n "''${__ETC_ZSHENV_SOURCED-}" ]; then return; fi
|
if [ -n "''${__ETC_ZSHENV_SOURCED-}" ]; then return; fi
|
||||||
__ETC_ZSHENV_SOURCED=1
|
__ETC_ZSHENV_SOURCED=1
|
||||||
|
|
||||||
if [ -z "''${__NIX_DARWIN_SET_ENVIRONMENT_DONE-}" ]; then
|
if [[ -o rcs ]]; then
|
||||||
. ${config.system.build.setEnvironment}
|
if [ -z "''${__NIX_DARWIN_SET_ENVIRONMENT_DONE-}" ]; then
|
||||||
|
. ${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}
|
||||||
fi
|
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.
|
# Read system-wide modifications.
|
||||||
if test -f /etc/zshenv.local; then
|
if test -f /etc/zshenv.local; then
|
||||||
source /etc/zshenv.local
|
source /etc/zshenv.local
|
||||||
|
|
Loading…
Reference in a new issue