Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: minimal dropbox command line completion



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





Messages sorted by: Reverse Date, Date, Thread, Author