From d6d4a3abfc84f0940e663cd69537789a039a7056 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 19 Jul 1999 14:26:14 +0000 Subject: zsh-3.1.6-test-2 --- Functions/Zftp/zfgoto | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Functions/Zftp/zfgoto') diff --git a/Functions/Zftp/zfgoto b/Functions/Zftp/zfgoto index 8d6f00a3a..bd1cdbfe5 100644 --- a/Functions/Zftp/zfgoto +++ b/Functions/Zftp/zfgoto @@ -67,7 +67,10 @@ line=${line#*@} host=${line%%:*} dir=${line#*:} -if [[ $user = ftp || $user = anonymous ]]; then +if [[ $ZFTP_USER = $user && $ZFTP_HOST = $host ]]; then + # We're already there, just change directory + zfcd ${dir:-~} +elif [[ $user = ftp || $user = anonymous ]]; then # Anonymous ftp, so we don't need password etc. zfanon $host && [[ -n $dir ]] && zfcd $dir elif [[ $zflastsession = ${host}:* && $user = $zflastuser ]]; then -- cgit 1.4.1