fix(last-working-dir): use explicit return 0 in early-exit guards (#13623)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1s

This commit is contained in:
Alessandro Elio Cantini 2026-03-10 10:52:12 +01:00 committed by GitHub
commit 8df5c1b18b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,8 +23,8 @@ lwd() {
#
# - This isn't the first time the plugin is loaded
# - We're not in the $HOME directory (e.g. if terminal opened a different folder)
[[ -z "$ZSH_LAST_WORKING_DIRECTORY" ]] || return
[[ "$PWD" == "$HOME" ]] || return
[[ -z "$ZSH_LAST_WORKING_DIRECTORY" ]] || return 0
[[ "$PWD" == "$HOME" ]] || return 0
if lwd 2>/dev/null; then
ZSH_LAST_WORKING_DIRECTORY=1