about summary refs log tree commit diff
path: root/Completion/Builtins/_zftp
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-19 11:18:05 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-19 11:18:05 +0000
commit9867c4091e71e6ed69889a9bfaee07275d2fa04e (patch)
tree37318116ff90f7b90df7cb9e894790d96be0849b /Completion/Builtins/_zftp
parent04979daf4f9b9645f22df1dfbb5974ab82294868 (diff)
downloadzsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.gz
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.xz
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.zip
manual/7448
Diffstat (limited to 'Completion/Builtins/_zftp')
-rw-r--r--Completion/Builtins/_zftp19
1 files changed, 12 insertions, 7 deletions
diff --git a/Completion/Builtins/_zftp b/Completion/Builtins/_zftp
index 32d32c2b7..e6f7ea683 100644
--- a/Completion/Builtins/_zftp
+++ b/Completion/Builtins/_zftp
@@ -7,11 +7,12 @@ _compskip=all
 # zfcd_match and zfget_match (used for old-style completion)
 # need to be installed for remote file and directory completion to work.
 
-local subcom
+local subcom expl
 
 if [[ $words[1] = zftp ]]; then
   if [[ $CURRENT -eq 2 ]]; then
-    compadd open params user login type ascii binary mode put \
+    _description expl sub-command
+    compadd "$expl[@]" open params user login type ascii binary mode put \
       putat get getat append appendat ls dir local remote mkdir rmdir
     return
   fi
@@ -24,13 +25,15 @@ case $subcom in
   *(cd|ls|dir))
    # complete remote directories; we could be smarter about hiding prefixes
    zfcd_match $PREFIX $SUFFIX
-   (( $#reply )) && compadd -S/ -q - $reply
+   _description expl 'remote directory'
+   (( $#reply )) && compadd "$expl[@]" -S/ -q - $reply
    ;;
 
   *(get(|at)|gcp|delete|remote))
    # complete remote files
    zfget_match $PREFIX $SUFFIX
-   (( $#reply )) && compadd -F fignore - $reply
+   _description expl 'remote file'
+   (( $#reply )) && compadd "$expl[@]" -F fignore - $reply
    ;;
 
   *(put(|at)|pcp))
@@ -40,18 +43,20 @@ case $subcom in
 
   *(open|anon|params))
   # complete hosts:  should do cleverer stuff with user names
-  compgen -k hosts
+  _description expl host
+  compgen "$expl[@]" -k hosts
   ;;
 
   *(goto|mark))
   # complete bookmarks.  First decide if ncftp mode is go.
+  _description expl bookmark
   if [[ $words[2] = -*n* ]]; then
     if [[ -f ~/.ncftp/bookmarks ]]; then
-      compadd - $(awk -F, 'NR > 2 { print $1 }' ~/.ncftp/bookmarks)
+      compadd "$expl[@]" - $(awk -F, 'NR > 2 { print $1 }' ~/.ncftp/bookmarks)
     fi
   else
     if [[ -f ${ZFTP_BMFILE:=${ZDOTDIR:-$HOME}/.zfbkmarks} ]]; then
-      compadd - $(awk '{print $1}' $ZFTP_BMFILE)
+      compadd "$expl[@]" - $(awk '{print $1}' $ZFTP_BMFILE)
     fi
   fi
   ;;