Use equality operator to check if in home directory

This commit is contained in:
Sendy Halim 2016-10-14 10:43:40 +07:00 committed by GitHub
commit fec7ba6f90

View file

@ -16,8 +16,8 @@ lwd() {
# Jump to last directory automatically unless:
# - 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
[[ "$PWD" != "$HOME" ]] && return
[[ "$PWD" == "$HOME" ]] && return
lwd 2>/dev/null && ZSH_LAST_WORKING_DIRECTORY=1 || true