diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2020-02-18 13:30:02 +0000 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2020-02-18 15:52:21 +0000 |
commit | 55819e6c861f53450030eea832a76583a6786370 (patch) | |
tree | e9b2f15490234a6c25d70f26baf30e1124cb7800 | |
parent | 9992702e4beac0230600a014073c91e315227d2d (diff) | |
download | nixpkgs-55819e6c861f53450030eea832a76583a6786370.tar nixpkgs-55819e6c861f53450030eea832a76583a6786370.tar.gz nixpkgs-55819e6c861f53450030eea832a76583a6786370.tar.bz2 nixpkgs-55819e6c861f53450030eea832a76583a6786370.tar.lz nixpkgs-55819e6c861f53450030eea832a76583a6786370.tar.xz nixpkgs-55819e6c861f53450030eea832a76583a6786370.tar.zst nixpkgs-55819e6c861f53450030eea832a76583a6786370.zip |
Revert "zsh: don't clobber the environment of non-login shells"
This reverts commit 6a756af3e7a50c22a45f7d958657527ac47d2902. Currently zshenv by default only set fpath and HELPDIR without exporting them. A parent shell would also not set those variables usually as they are shell local. It also sources a file called set-environment but this is protected by an environment variable called __NIXOS_SET_ENVIRONMENT_DONE. Hence any modification done by the parent shell should persist as long as __NIXOS_SET_ENVIRONMENT_DONE is not unset. This behavior deviates from what we do in bashrc and breaks common setups such as tmux/mosh or screen. Fixes #80437
-rw-r--r-- | nixos/modules/programs/zsh/zsh.nix | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix index 4fbdba47b1d..930cc1987a3 100644 --- a/nixos/modules/programs/zsh/zsh.nix +++ b/nixos/modules/programs/zsh/zsh.nix @@ -162,9 +162,8 @@ 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 + __ETC_ZSHENV_SOURCED=1 if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ]; then . ${config.system.build.setEnvironment} |