mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-18 02:09:49 +00:00
fix(last-working-dir): use explicit return 0 in early-exit guards (#13623)
This commit is contained in:
committed by
GitHub
parent
d1222044bc
commit
8df5c1b18b
@@ -23,8 +23,8 @@ lwd() {
|
|||||||
#
|
#
|
||||||
# - This isn't the first time the plugin is loaded
|
# - 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)
|
# - We're not in the $HOME directory (e.g. if terminal opened a different folder)
|
||||||
[[ -z "$ZSH_LAST_WORKING_DIRECTORY" ]] || return
|
[[ -z "$ZSH_LAST_WORKING_DIRECTORY" ]] || return 0
|
||||||
[[ "$PWD" == "$HOME" ]] || return
|
[[ "$PWD" == "$HOME" ]] || return 0
|
||||||
|
|
||||||
if lwd 2>/dev/null; then
|
if lwd 2>/dev/null; then
|
||||||
ZSH_LAST_WORKING_DIRECTORY=1
|
ZSH_LAST_WORKING_DIRECTORY=1
|
||||||
|
|||||||
Reference in New Issue
Block a user