diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e15cfab30..49ab5c2b1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -225,6 +225,7 @@ Completions - ``rst2html``, ``rst2html4``, ``rst2html5``, ``rst2latex``, ``rst2man``, ``rst2odt``, ``rst2pseudoxml``, ``rst2s5``, ``rst2xetex``, ``rst2xml`` and ``rstpep2html`` (#7019) + - ``spago`` (#7381) - ``sphinx-apidoc``, ``sphinx-autogen``, ``sphinx-build`` and ``sphinx-quickstart`` (#7000) - ``strace`` (#6656) diff --git a/share/completions/spago.fish b/share/completions/spago.fish index 464f1c620..459244601 100644 --- a/share/completions/spago.fish +++ b/share/completions/spago.fish @@ -1,17 +1,14 @@ # fish completion for spago, PureScript package manager and build tool # version v0.16.0 -spago --fish-completion-script (which spago) | source +spago --fish-completion-script (command -v spago) | source function __fish_spago_is_arg_n --argument-names n test $n -eq (count (string match -v -- '-*' (commandline -poc))) end function __fish_spago_pkgnames - for line in (spago ls packages 2> /dev/null) - set pkgname (echo $line | string match -r '[^\s]+') - echo $pkgname - end + spago ls packages 2>/dev/null | string match -r '\S+' end complete -c spago -n '__fish_seen_subcommand_from install; and __fish_spago_is_arg_n 2' -a '(__fish_spago_pkgnames)'