diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2000-05-08 10:45:02 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2000-05-08 10:45:02 +0000 |
commit | 17d342160ae1c59687b61332bd4dee5e62bd509a (patch) | |
tree | 7ca5430438165cd96abb44d1d201819438625f11 /Functions/Zftp/zftransfer | |
parent | cfcb3202ef71040a7019609da6cb21de57f16ad6 (diff) | |
download | zsh-17d342160ae1c59687b61332bd4dee5e62bd509a.tar.gz zsh-17d342160ae1c59687b61332bd4dee5e62bd509a.tar.xz zsh-17d342160ae1c59687b61332bd4dee5e62bd509a.zip |
11252: no colon at the end of zftp function contexts
Diffstat (limited to 'Functions/Zftp/zftransfer')
-rw-r--r-- | Functions/Zftp/zftransfer | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Functions/Zftp/zftransfer b/Functions/Zftp/zftransfer index 929f099d2..c70bf7248 100644 --- a/Functions/Zftp/zftransfer +++ b/Functions/Zftp/zftransfer @@ -4,6 +4,7 @@ emulate -L zsh +[[ $curcontext = :zf* ]] || local curcontext=:zftransfer local sess1 sess2 file1 file2 oldsess=${ZFTP_SESSION} if [[ $# -ne 2 ]]; then @@ -39,7 +40,9 @@ zfautocheck || return 1 # the size from the pipe --- and if it does, it's probably wrong. # To avoid that, try to get the size and set it for the progress to # see. -if [[ $zfconfig[progress] != none ]]; then +local style +zstyle -s ':zftp:zftransfer' progress style +if [[ -n $style && $style != none ]]; then local ZFTP_TSIZE array tmpfile=${TMPPREFIX}zft$$ zftp remote $file1 >$tmpfile 2>/dev/null array=($(<$tmpfile)) @@ -49,7 +52,7 @@ fi # We do the RHS of the pipeline in a subshell, too, so that # the LHS can get SIGPIPE when it exits. -{ zfconfig[progress]=none +{ zstyle '*' progress none zftp get $file1 } | ( zftp session $sess2 zfautocheck && zftp put $file2 ) |