Files
home-manager/tests/modules/programs/zsh/session-variables.zshenv
Austin Horstman d5ece85b6d zsh: guard session variables under nounset
Use parameter expansion with a default value when checking Home Manager's session-variable sentinels.

Users with zsh NO_UNSET or shell nounset enabled were seeing parameter-not-set errors before the generated session variables had a chance to export the sentinel variables.

Update the home session-variable and zsh fixtures to cover the generated guards.
2026-05-16 08:20:26 -05:00

14 lines
377 B
Plaintext

# Environment variables
. "/nix/store/00000000000000000000000000000000-hm-session-vars.sh/etc/profile.d/hm-session-vars.sh"
# Only source this once
if [[ -z "${__HM_ZSH_SESS_VARS_SOURCED-}" ]]; then
export __HM_ZSH_SESS_VARS_SOURCED=1
export IS_EMPTY=""
export IS_FALSE=false
export IS_TRUE=true
export PATH="$HOME/bin:$PATH"
export V1="v1"
export V2="v2-v1"
fi