8df5c1b18b1393dc5046c729094f897bd3636a9b
- Author
- Alessandro Elio Cantini <aecantini@gmail.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
fix(last-working-dir): use explicit return 0 in early-exit guards (#13623)
Diff
1diff --git a/plugins/last-working-dir/last-working-dir.plugin.zsh b/plugins/last-working-dir/last-working-dir.plugin.zsh
2index b816f6a8f7b4e711bb7381db8753bddbdd249b64..951ebff10f8952538f2187e5f5736384b3a6cba1 100644
3--- a/plugins/last-working-dir/last-working-dir.plugin.zsh
4+++ b/plugins/last-working-dir/last-working-dir.plugin.zsh
5@@ -23,8 +23,8 @@ lwd() {
6 #
7 # - This isn't the first time the plugin is loaded
8 # - We're not in the $HOME directory (e.g. if terminal opened a different folder)
9-[[ -z "$ZSH_LAST_WORKING_DIRECTORY" ]] || return
10-[[ "$PWD" == "$HOME" ]] || return
11+[[ -z "$ZSH_LAST_WORKING_DIRECTORY" ]] || return 0
12+[[ "$PWD" == "$HOME" ]] || return 0
13
14 if lwd 2>/dev/null; then
15 ZSH_LAST_WORKING_DIRECTORY=1