From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: PATCH: minimal dropbox command line completion
Date: Thu, 27 Aug 2020 21:15:57 +0100 [thread overview]
Message-ID: <ee24c5f032cd407c4677b670fc297f7152868ed8.camel@ntlworld.com> (raw)
diff --git a/Completion/Unix/Command/_dropbox b/Completion/Unix/Command/_dropbox
new file mode 100644
index 000000000..4dd9c8ad8
--- /dev/null
+++ b/Completion/Unix/Command/_dropbox
@@ -0,0 +1,16 @@
+#compdef dropbox
+
+if [[ CURRENT -eq 2 || $words[2] = help ]]; then
+ local -a line progs
+
+ _call_program commands command dropbox help |
+ while read -A line; do
+ if [[ $line[1] = [a-z]## ]]; then
+ progs+=("$line[1]:$line[2,-1]")
+ fi
+ done
+
+ _describe -t dropbox-commands 'Dropbox command' progs
+elif [[ $words[2] = (ls|filestatus|sharelink) ]]; then
+ _files
+fi
next reply other threads:[~2020-08-27 20:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 20:15 Peter Stephenson [this message]
2020-08-28 2:22 ` Daniel Shahaf
2020-08-28 8:27 ` Peter Stephenson
2020-08-29 0:38 ` Daniel Shahaf
2020-08-29 11:45 ` Oliver Kiddle
2020-08-29 13:49 ` Peter Stephenson
2020-08-29 19:58 ` PATCH: minimal dropbox command line completion (and $compstate[nmatches]/$ret) Daniel Shahaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ee24c5f032cd407c4677b670fc297f7152868ed8.camel@ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).