From 39923155057e3198e7f488d663cedc173363914b Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 28 Sep 2015 16:08:01 +0200 Subject: [PATCH] Normalize cabal* completion --- share/completions/cabal-dev.fish | 2 +- share/completions/cabal.fish | 11 +++++++++++ share/functions/__fish_complete_cabal.fish | 10 ---------- 3 files changed, 12 insertions(+), 11 deletions(-) delete mode 100644 share/functions/__fish_complete_cabal.fish diff --git a/share/completions/cabal-dev.fish b/share/completions/cabal-dev.fish index e397d0949..5340941a7 100644 --- a/share/completions/cabal-dev.fish +++ b/share/completions/cabal-dev.fish @@ -1 +1 @@ -complete -c cabal-dev -a '(__fish_complete_cabal)' +complete -c cabal-dev -w cabal diff --git a/share/completions/cabal.fish b/share/completions/cabal.fish index 5b5cdb2d1..02eecd5f8 100644 --- a/share/completions/cabal.fish +++ b/share/completions/cabal.fish @@ -1 +1,12 @@ +function __fish_complete_cabal + if type -q -f cabal + set cmd (commandline -poc) + if test (count $cmd) -gt 1 + cabal $cmd[2..-1] --list-options + else + cabal --list-options + end + end +end + complete -c cabal -a '(__fish_complete_cabal)' diff --git a/share/functions/__fish_complete_cabal.fish b/share/functions/__fish_complete_cabal.fish deleted file mode 100644 index 484710a84..000000000 --- a/share/functions/__fish_complete_cabal.fish +++ /dev/null @@ -1,10 +0,0 @@ -function __fish_complete_cabal - if type -q -f cabal - set cmd (commandline -poc) - if test (count $cmd) -gt 1 - cabal $cmd[2..-1] --list-options - else - cabal --list-options - end - end -end