diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-25 15:43:45 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-25 15:43:45 +0000 |
commit | e8eb43fc308acb3f1a8ebada7633c097e5050e46 (patch) | |
tree | 2df36ef3c7709c7d4d3b7bdcb5761f98649859bf /Functions/Zftp/zfput | |
parent | e74702b467171dbdafb56dfe354794a212e020d9 (diff) | |
download | zsh-e8eb43fc308acb3f1a8ebada7633c097e5050e46.tar.gz zsh-e8eb43fc308acb3f1a8ebada7633c097e5050e46.tar.xz zsh-e8eb43fc308acb3f1a8ebada7633c097e5050e46.zip |
Initial revision
Diffstat (limited to 'Functions/Zftp/zfput')
-rw-r--r-- | Functions/Zftp/zfput | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Functions/Zftp/zfput b/Functions/Zftp/zfput new file mode 100644 index 000000000..0687163f0 --- /dev/null +++ b/Functions/Zftp/zfput @@ -0,0 +1,23 @@ +# function zfput { +# Simple put: dump every file under the same name, but stripping +# off any directory parts to get the remote filename (i.e. always +# goes into current remote directory). Use zfpcp to specify new +# file name or new directory at remote end. + +emulate -L zsh + +local loc rem +integer stat do_close + +zfautocheck + +for loc in $*; do + rem=${loc:t} + zftp put $rem <$loc + [[ $? == 0 ]] || stat=$? +done + +(( $do_close )) && zfclose + +return $stat +# } |