From 8df5c1b18b1393dc5046c729094f897bd3636a9b Mon Sep 17 00:00:00 2001 From: Alessandro Elio Cantini Date: Tue, 10 Mar 2026 10:52:12 +0100 Subject: [PATCH] fix(last-working-dir): use explicit return 0 in early-exit guards (#13623) --- plugins/last-working-dir/last-working-dir.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/last-working-dir/last-working-dir.plugin.zsh b/plugins/last-working-dir/last-working-dir.plugin.zsh index b816f6a8f..951ebff10 100644 --- a/plugins/last-working-dir/last-working-dir.plugin.zsh +++ b/plugins/last-working-dir/last-working-dir.plugin.zsh @@ -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