mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
Use equality operator to check if in home directory
This commit is contained in:
parent
31a84e710f
commit
fec7ba6f90
1 changed files with 2 additions and 2 deletions
|
|
@ -16,8 +16,8 @@ lwd() {
|
||||||
|
|
||||||
# Jump to last directory automatically unless:
|
# Jump to last directory automatically unless:
|
||||||
# - this isn't the first time the plugin is loaded
|
# - this isn't the first time the plugin is loaded
|
||||||
# - it's not in $HOME directory
|
# - it's in $HOME directory
|
||||||
[[ -n "$ZSH_LAST_WORKING_DIRECTORY" ]] && return
|
[[ -n "$ZSH_LAST_WORKING_DIRECTORY" ]] && return
|
||||||
[[ "$PWD" != "$HOME" ]] && return
|
[[ "$PWD" == "$HOME" ]] && return
|
||||||
|
|
||||||
lwd 2>/dev/null && ZSH_LAST_WORKING_DIRECTORY=1 || true
|
lwd 2>/dev/null && ZSH_LAST_WORKING_DIRECTORY=1 || true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue