zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: minimal dropbox command line completion
@ 2020-08-27 20:15 Peter Stephenson
  2020-08-28  2:22 ` Daniel Shahaf
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2020-08-27 20:15 UTC (permalink / raw)
  To: Zsh hackers list

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-29 19:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 20:15 PATCH: minimal dropbox command line completion Peter Stephenson
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

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).