diff options
author | Clint Adams <clint@users.sourceforge.net> | 2007-07-03 07:13:29 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2007-07-03 07:13:29 +0000 |
commit | 225f9285471e62ce48902e29d5d7e335bdbbf222 (patch) | |
tree | 4803a25a35db1e13af20c6051149473eb386b705 /Functions | |
parent | 38fbcffca02279495154ee6d50fd0dbb94a69b55 (diff) | |
download | zsh-225f9285471e62ce48902e29d5d7e335bdbbf222.tar.gz zsh-225f9285471e62ce48902e29d5d7e335bdbbf222.tar.xz zsh-225f9285471e62ce48902e29d5d7e335bdbbf222.zip |
23645: use == instead of =.
Diffstat (limited to 'Functions')
-rw-r--r-- | Functions/Zftp/zfautocheck | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Functions/Zftp/zfautocheck b/Functions/Zftp/zfautocheck index abb994061..e53fde8d2 100644 --- a/Functions/Zftp/zfautocheck +++ b/Functions/Zftp/zfautocheck @@ -11,23 +11,31 @@ # command, which implies we are looking for something so should stay open # for it. -# Remember the old session: zflastsession will be overwritten by +# Remember the old location: will be overwritten by # a successful open. -local lastsession=$zflastsession +local lastloc=$zfconfig[lastloc_$ZFTP_SESSION] + +# Don't print out user messages when re-opening the connection. +local ZFTP_VERBOSE=${ZFTP_VERBOSE//0} + +# Unset the delay counter from the progress meter in case there was an +# abnormal exit. +(( ${+zftpseconds} )) && unset zftpseconds if [[ -z $ZFTP_HOST ]]; then zfopen || return 1 - [[ $1 = *d* ]] || do_close=1 + [[ $1 == *d* ]] || do_close=1 elif zftp test 2>/dev/null; then return 0 else zfopen || return 1 fi -if [[ $1 = *n* ]]; then +if [[ $1 == *n* ]]; then return 0 -elif [[ -n $lastsession && $ZFTP_HOST = ${lastsession%%:*} ]]; then - zfcd ${lastsession#*:} +elif [[ -n $lastloc && $ZFTP_HOST == ${lastloc%%:*} ]]; then + # don't print directory since we're just going back where we were. + zfcd ${lastloc#*:} >& /dev/null fi # } |