mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 07:34:32 +00:00
Add completions for cabal; closes #567
This commit is contained in:
parent
3087f57453
commit
2b99190a1b
3 changed files with 12 additions and 0 deletions
1
share/completions/cabal-dev.fish
Normal file
1
share/completions/cabal-dev.fish
Normal file
|
@ -0,0 +1 @@
|
|||
complete -c cabal-dev -a '(__fish_complete_cabal)'
|
1
share/completions/cabal.fish
Normal file
1
share/completions/cabal.fish
Normal file
|
@ -0,0 +1 @@
|
|||
complete -c cabal -a '(__fish_complete_cabal)'
|
10
share/functions/__fish_complete_cabal.fish
Normal file
10
share/functions/__fish_complete_cabal.fish
Normal 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
|
Loading…
Reference in a new issue