Use builtin command in spago completions, add to changelog

This commit is contained in:
Johannes Altmanninger 2020-10-10 13:10:28 +02:00
parent d544cda937
commit 863b4700f8
2 changed files with 3 additions and 5 deletions

View file

@ -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)

View file

@ -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)'