mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
Merge pull request #1071 from antoineco/zsh/fix-children-shells-init
Backport Zsh fpath child shell and nounset fixes from NixOS
This commit is contained in:
commit
1380edcdf3
1 changed files with 4 additions and 5 deletions
|
@ -124,14 +124,13 @@ in
|
|||
# This file is read for all shells.
|
||||
|
||||
# Only execute this file once per shell.
|
||||
# But don't clobber the environment of interactive non-login children!
|
||||
if [ -n "$__ETC_ZSHENV_SOURCED" ]; then return; fi
|
||||
export __ETC_ZSHENV_SOURCED=1
|
||||
if [ -n "''${__ETC_ZSHENV_SOURCED-}" ]; then return; fi
|
||||
__ETC_ZSHENV_SOURCED=1
|
||||
|
||||
# Don't execute this file when running in a pure nix-shell.
|
||||
if test -n "$IN_NIX_SHELL"; then return; fi
|
||||
|
||||
if [ -z "$__NIX_DARWIN_SET_ENVIRONMENT_DONE" ]; then
|
||||
if [ -z "''${__NIX_DARWIN_SET_ENVIRONMENT_DONE-}" ]; then
|
||||
. ${config.system.build.setEnvironment}
|
||||
fi
|
||||
|
||||
|
@ -153,7 +152,7 @@ in
|
|||
# This file is read for login shells.
|
||||
|
||||
# Only execute this file once per shell.
|
||||
if [ -n "$__ETC_ZPROFILE_SOURCED" ]; then return; fi
|
||||
if [ -n "''${__ETC_ZPROFILE_SOURCED-}" ]; then return; fi
|
||||
__ETC_ZPROFILE_SOURCED=1
|
||||
|
||||
${concatStringsSep "\n" zshVariables}
|
||||
|
|
Loading…
Reference in a new issue