From 61e68d70da5af5afe943f92cd94a8c96e78348d9 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Sun, 1 Aug 1999 14:48:28 +0000 Subject: zsh-3.1.6 --- Functions/Zftp/zftp_chpwd | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'Functions/Zftp/zftp_chpwd') 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 -- cgit 1.4.1