summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorClint Adams <clint@debian.org>2015-04-10 19:31:33 -0400
committerClint Adams <clint@debian.org>2015-04-10 19:31:33 -0400
commitb3d32115f86c97527ea0ff9f9b9bc20f9ade2e2b (patch)
treebe333783194c79ea30d9eda12e4bfc3c15bea6cc /Completion/Unix/Command
parentca8edaba9265c5328322706a56bf664fd85e3af7 (diff)
downloadzsh-b3d32115f86c97527ea0ff9f9b9bc20f9ade2e2b.tar.gz
zsh-b3d32115f86c97527ea0ff9f9b9bc20f9ade2e2b.tar.xz
zsh-b3d32115f86c97527ea0ff9f9b9bc20f9ade2e2b.zip
34874: completion for cabal
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_cabal9
1 files changed, 9 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_cabal b/Completion/Unix/Command/_cabal
new file mode 100644
index 000000000..bd81cf261
--- /dev/null
+++ b/Completion/Unix/Command/_cabal
@@ -0,0 +1,9 @@
+#compdef cabal
+
+local -a subcmds
+
+subcmds=(${${${${${(f)"$(cabal --help)"}[(r)Commands:*,(r)For more information*]}[2,-2]}#  }%% *})
+
+_arguments \
+    '1:subcmd:compadd -a subcmds' \
+    ':other: _alternative "options:option:compadd -- $(cabal $words[2] --list-options)" "files:file:_files"'