mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 21:18:53 +00:00
Normalize cabal* completion
This commit is contained in:
parent
eb4e4fa7ad
commit
3992315505
3 changed files with 12 additions and 11 deletions
|
@ -1 +1 @@
|
||||||
complete -c cabal-dev -a '(__fish_complete_cabal)'
|
complete -c cabal-dev -w cabal
|
||||||
|
|
|
@ -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)'
|
complete -c cabal -a '(__fish_complete_cabal)'
|
||||||
|
|
|
@ -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
|
|
Loading…
Reference in a new issue