feat(shell): load .zshenv and respect ZDOTDIR if present (#1958)

This commit is contained in:
Yihui Khuu 2025-08-16 04:24:34 +10:00 committed by GitHub
parent 86df4073d1
commit 70f14cccd6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1066,7 +1066,8 @@ export namespace Session {
const script =
scripts[shellName] ??
`[[ -f ~/.zshrc ]] && source ~/.zshrc >/dev/null 2>&1 || true
`[[ -f ~/.zshenv ]] && source ~/.zshenv >/dev/null 2>&1 || true
[[ -f "\${ZDOTDIR:-$HOME}/.zshrc" ]] && source "\${ZDOTDIR:-$HOME}/.zshrc" >/dev/null 2>&1 || true
[[ -f ~/.bashrc ]] && source ~/.bashrc >/dev/null 2>&1 || true
eval "${input.command}"`