summary refs log tree commit diff
path: root/Completion/Unix/Command/_cabal
blob: bd81cf26164580d987d0eca19bbdc1badeb34f43 (plain) (blame)
1
2
3
4
5
6
7
8
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"'