diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/completions/cabal-dev.fish | 2 | ||||
-rw-r--r-- | share/completions/cabal.fish | 11 | ||||
-rw-r--r-- | share/functions/__fish_complete_cabal.fish | 10 |
3 files changed, 12 insertions, 11 deletions
diff --git a/share/completions/cabal-dev.fish b/share/completions/cabal-dev.fish index e397d094..5340941a 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 5b5cdb2d..02eecd5f 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 484710a8..00000000 --- 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 |