Add completions for cabal; closes #567

This commit is contained in:
Dag Odenhall 2013-05-04 16:48:24 +02:00 committed by ridiculousfish
parent 3087f57453
commit 2b99190a1b
3 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1 @@
complete -c cabal-dev -a '(__fish_complete_cabal)'

View file

@ -0,0 +1 @@
complete -c cabal -a '(__fish_complete_cabal)'

View file

@ -0,0 +1,10 @@
function __fish_complete_cabal
if type -f cabal >/dev/null
set cmd (commandline -poc)
if test (count $cmd) -gt 1
cabal $cmd[2..-1] --list-options
else
cabal --list-options
end
end
end