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/zfanon | |
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/zfanon')
-rw-r--r-- | Functions/Zftp/zfanon | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Functions/Zftp/zfanon b/Functions/Zftp/zfanon index d8a9d06a3..9624d48d9 100644 --- a/Functions/Zftp/zfanon +++ b/Functions/Zftp/zfanon @@ -2,7 +2,7 @@ emulate -L zsh -local opt optlist once +local opt optlist once dir while [[ $1 = -* ]]; do if [[ $1 = - || $1 = -- ]]; then @@ -61,10 +61,20 @@ if [[ -z $EMAIL_ADDR ]]; then print "Using $EMAIL_ADDR as anonymous FTP password." fi +if [[ $1 = */* ]]; then + 1=${1##ftp://} + dir=${1#*/} + 1=${1%%/*} +fi + if [[ $once = 1 ]]; then - zftp open $1 anonymous $EMAIL_ADDR + zftp open $1 anonymous $EMAIL_ADDR || return 1 else zftp params $1 anonymous $EMAIL_ADDR - zftp open + zftp open || return 1 +fi + +if [[ -n $dir ]]; then + zfcd $dir fi # } |