diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-11 07:57:56 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-11 07:57:56 +0000 |
commit | fac3086d9782e73dcaf1aa65fd36a0b63a374719 (patch) | |
tree | 7bab35e2787ca17f02ec932dffae1bfff2ffcfe3 /Completion/Builtins/_zftp | |
parent | 37012f06a7e5e8a64614dbf9032c77cff1bcfcfb (diff) | |
download | zsh-fac3086d9782e73dcaf1aa65fd36a0b63a374719.tar.gz zsh-fac3086d9782e73dcaf1aa65fd36a0b63a374719.tar.xz zsh-fac3086d9782e73dcaf1aa65fd36a0b63a374719.zip |
_wanted now tests both tags and labels; change places where _wanted was called without a command; allow multiple patterns per string in file-patterns; update _next_tags to work with labels (10632)
Diffstat (limited to 'Completion/Builtins/_zftp')
-rw-r--r-- | Completion/Builtins/_zftp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Completion/Builtins/_zftp b/Completion/Builtins/_zftp index 0d6530dfc..610af2607 100644 --- a/Completion/Builtins/_zftp +++ b/Completion/Builtins/_zftp @@ -28,35 +28,34 @@ fi case $subcom in *(cd|ls|dir)) # complete remote directories - _wanted directories && zfcd_match $PREFIX $SUFFIX + _tags directories && zfcd_match $PREFIX $SUFFIX ;; *(get(|at)|gcp|delete|remote)) # complete remote files - _wanted files && zfget_match $PREFIX $SUFFIX + _tags files && zfget_match $PREFIX $SUFFIX ;; *(put(|at)|pcp)) # complete local files - _wanted files && _files + _files ;; *(open|anon|params)) # complete hosts: should do cleverer stuff with user names - _wanted hosts && _hosts + _hosts ;; *(goto|mark)) # complete bookmarks. First decide if ncftp mode is go. - _wanted bookmarks || return 1 if [[ $words[2] = -*n* ]]; then if [[ -f ~/.ncftp/bookmarks ]]; then - _all_labels bookmarks expl bookmark \ + _wanted bookmarks expl bookmark \ compadd - $(awk -F, 'NR > 2 { print $1 }' ~/.ncftp/bookmarks) fi else if [[ -f ${ZFTP_BMFILE:=${ZDOTDIR:-$HOME}/.zfbkmarks} ]]; then - _all_labels bookmarks expl bookmark \ + _wanted bookmarks expl bookmark \ compadd - $(awk '{print $1}' $ZFTP_BMFILE) fi fi @@ -72,7 +71,7 @@ case $subcom in # complete arguments like sess1:file1 sess2:file2 if [[ $PREFIX = *:* ]]; then # complete file in the given session - _wanted files || return 1 + _tags files || return 1 local sess=${PREFIX%%:*} oldsess=$ZFTP_SESSION compset -p $(( $#sess + 1 )) [[ -n $sess ]] && zftp session $sess |