diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-08-01 14:48:28 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-08-01 14:48:28 +0000 |
commit | 61e68d70da5af5afe943f92cd94a8c96e78348d9 (patch) | |
tree | 1e88adbfc21452caedcb57af2880097a349f44e6 /Functions/Zftp/zftp_chpwd | |
parent | 14810d6df13e0564a606b74e4c4e918e80862e25 (diff) | |
download | zsh-61e68d70da5af5afe943f92cd94a8c96e78348d9.tar.gz zsh-61e68d70da5af5afe943f92cd94a8c96e78348d9.tar.xz zsh-61e68d70da5af5afe943f92cd94a8c96e78348d9.zip |
zsh-3.1.6 dot-zsh-199908011751
Diffstat (limited to 'Functions/Zftp/zftp_chpwd')
-rw-r--r-- | Functions/Zftp/zftp_chpwd | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Functions/Zftp/zftp_chpwd b/Functions/Zftp/zftp_chpwd index f1c2d5311..0b5bbd7d5 100644 --- a/Functions/Zftp/zftp_chpwd +++ b/Functions/Zftp/zftp_chpwd @@ -1,13 +1,16 @@ # function zftp_chpwd { # You may want to alter chpwd to call this when $ZFTP_USER is set. -# Cancel the filename cache for the current directory. -zftp_fcache=() -# ...and also empty the stored directory listing cache. -# As this function is called when we close the connection, this -# is the only place we need to do these two things. -[[ -n $zfcurdir && -f $zfcurdir ]] && rm -f $zfcurdir -zfotherargs= +# If the directory really changed... +if [[ $ZFTP_PWD != $zflastdir ]]; then + # Cancel the filename cache for the current directory. + zftp_fcache=() + # ...and also empty the stored directory listing cache. + # As this function is called when we close the connection, this + # is the only place we need to do these two things. + [[ -n $zfcurdir && -f $zfcurdir ]] && rm -f $zfcurdir + zfotherargs= +fi if [[ -z $ZFTP_USER ]]; then # last call, after an FTP logout |