diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-10 13:57:31 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-10 13:57:31 +0000 |
commit | b67e4abb100f67ca05809baab37700eb5ee0a342 (patch) | |
tree | f19c7eb1544bd6071e01155825a7aae3cc99117d /Functions/Zftp/zfparams | |
parent | bc3256997b737f6158e9768dcf5738a7c0fbb454 (diff) | |
download | zsh-b67e4abb100f67ca05809baab37700eb5ee0a342.tar.gz zsh-b67e4abb100f67ca05809baab37700eb5ee0a342.tar.xz zsh-b67e4abb100f67ca05809baab37700eb5ee0a342.zip |
manual/7767
Diffstat (limited to 'Functions/Zftp/zfparams')
-rw-r--r-- | Functions/Zftp/zfparams | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/Functions/Zftp/zfparams b/Functions/Zftp/zfparams index 5c5262c52..faae63251 100644 --- a/Functions/Zftp/zfparams +++ b/Functions/Zftp/zfparams @@ -2,11 +2,25 @@ emulate -L zsh -# Set to prompt for any user or password if not given. -# Don't worry about accounts here. -if (( $# > 0 )); then +if [[ $# -eq 1 && $1 = - ]]; then + # Delete existing parameter set. + local sess=$ZFTP_SESSION key + key=${zfconfig[fcache_$sess]} + [[ -n $key ]] && unset $key + for key in fcache lastloc lastdir curdir otherdir otherargs lastuser; do + unset "zfconfig[${key}_${sess}]" + done +elif (( $# > 0 )); then + # Set to prompt for any user or password if not given. + # Don't worry about accounts here. (( $# < 2 )) && 2='?' - (( $# < 3 )) && 3='?' + if (( $# < 3 )); then + if [[ $2 = '?'* ]]; then + 3="?Password on ${1}: " + else + 3="?Password for ${2##\\?} on ${1}: " + fi + fi fi zftp params $* # } |