diff options
author | 2013-05-04 16:48:24 +0200 | |
---|---|---|
committer | 2013-05-04 12:48:38 -0700 | |
commit | 2b99190a1b5ec545db86d480e07415fffb09fe6c (patch) | |
tree | 659936a30ac68fbb5e5d824937632ea549d35393 /share | |
parent | 3087f5745349b59b289fb1adf0b61655337c1229 (diff) |
Add completions for cabal; closes #567
Diffstat (limited to 'share')
-rw-r--r-- | share/completions/cabal-dev.fish | 1 | ||||
-rw-r--r-- | share/completions/cabal.fish | 1 | ||||
-rw-r--r-- | share/functions/__fish_complete_cabal.fish | 10 |
3 files changed, 12 insertions, 0 deletions
diff --git a/share/completions/cabal-dev.fish b/share/completions/cabal-dev.fish new file mode 100644 index 00000000..e397d094 --- /dev/null +++ b/share/completions/cabal-dev.fish @@ -0,0 +1 @@ +complete -c cabal-dev -a '(__fish_complete_cabal)' diff --git a/share/completions/cabal.fish b/share/completions/cabal.fish new file mode 100644 index 00000000..5b5cdb2d --- /dev/null +++ b/share/completions/cabal.fish @@ -0,0 +1 @@ +complete -c cabal -a '(__fish_complete_cabal)' diff --git a/share/functions/__fish_complete_cabal.fish b/share/functions/__fish_complete_cabal.fish new file mode 100644 index 00000000..b5b8c0c0 --- /dev/null +++ b/share/functions/__fish_complete_cabal.fish @@ -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 |