fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerMerge branch 'completions-to-use-expanded-tokens'a9618477e

master
485 B14 linesraw
1# fish completion for spago, PureScript package manager and build tool
2# version v0.16.0
3
4spago --fish-completion-script (command -v spago) | source
5
6function __fish_spago_is_arg_n --argument-names n
7    test $n -eq (count (string match -v -- '-*' (commandline -pxc)))
8end
9
10function __fish_spago_pkgnames
11    spago ls packages 2>/dev/null | string match -r '\S+'
12end
13
14complete -c spago -n '__fish_seen_subcommand_from install; and __fish_spago_is_arg_n 2' -a '(__fish_spago_pkgnames)'