about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_seafile33
2 files changed, 36 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f369567c..b18d0914e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2019-09-26  Oliver Kiddle  <okiddle@yahoo.co.uk>
 
+	* Gautam Iyer: gitlab !9: Completion/Unix/Command/_seafile:
+	Rudimentary seafile client completion
+
 	* Doron Behar: gitlab !11: Completion/Unix/Command/_luarocks:
 	Fix/improve logic of cache validation
 
diff --git a/Completion/Unix/Command/_seafile b/Completion/Unix/Command/_seafile
new file mode 100644
index 000000000..bd36c0ac8
--- /dev/null
+++ b/Completion/Unix/Command/_seafile
@@ -0,0 +1,33 @@
+#compdef seaf-cli
+
+local -a commands
+
+commands=(
+  "init\:'initialize config directory'"
+  "start\:'start seafile daemon'"
+  "stop\:'stop seafile daemon'"
+  "list\:'list local libraries'"
+  "list-remote\:'list remote libraries'"
+  "status\:'show syncing status'"
+  "download\:'download a library from seafile server'"
+  "download-by-name\:'download a library defined by name from seafile server'"
+  "sync\:'sync a library with an existing foler'"
+  "desync\:'desync a library with seafile server'"
+  "create\:'create a library'"
+  "config\:'configure seafile client'"
+)
+
+_arguments \
+  ":command:(($commands))" \
+  {-h,--help}'[show help]' \
+  {-c,--confdir}'[specify config directory]:config directory:_files -/' \
+  {-d,--dir,--folder}'[directory]:directory:_directories' \
+  {-s,--server}'[URL for seafile server]':server \
+  {-u,--username}'[username]':username \
+  {-p,--password}'[password]':password \
+  {-a,--tfa}'[two-factor authentication]':tfa \
+  {-l,--library}'[library id]':library \
+  {-e,--libpasswd}'[library password]':libpasswd \
+  {-k,--key}'[configuration key]':key \
+  {-v,--value}'[configuration value]':value \
+  "*: :_files"