Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: minimal dropbox command line completion
- X-seq: zsh-workers 47341
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: PATCH: minimal dropbox command line completion
- Date: Thu, 27 Aug 2020 21:15:57 +0100
- Archived-at: <https://zsh.org/workers/47341>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-08/ee24c5f032cd407c4677b670fc297f7152868ed8.camel%40ntlworld.com>
- Authentication-results: zsh.org; iprev=pass (know-smtprelay-omc-9.server.virginmedia.net) smtp.remote-ip=80.0.253.73; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=skipped; arc=none
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1598559357; bh=UORX1DDyKEPHWrDHD1bkeKyRzgJ8IbrPYHjoC2nPpiA=; h=Subject:From:To:Date; b=3tang3w3qrhV8kyuP+ct0g3xIol5h7VoBIHyWDAOrn/DIDgg34sN2lvSRYb6W0d12 YZ4DopoHcZ5i8wzLabcau7AdrI7kAkwQsiBNW2tI+emmx7VCDLs5A8QpRorCe4b6VY 1/M3CCaiMzVk/4+GS75hcWoMx94IZ01oN+PoUCvRu1WNrHPyaSWVV4Gm0hYKFg3kz8 iMIQAa+/XmEJ+GEomLMxypiPxsisWXbuFBKXTP3OFrm/1POt2rVO1sh4r7F/Q9Ucex 3vmHNK3xL322cXINaquLlF7BOhDveIebQ7n+JkZN6uAIpBuQwwJXjQVfmdzHsJqw9N 3KAxOP7QpEQCQ==
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- Sender: zsh-workers-request@xxxxxxx
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