fn -remotes-packages { kcp -lN } options = [ -h -v -i -di -u -l -lN -lS -lI -lO -lx -lxS -lxI -lxO -lf -s -g -V ] np = [ -i -di -s -g -V ] fn complete [@argv]{ local:c = (count $argv) if (== $c 2) { all $options } elif (and (== $c 3) (has-value $np $argv[-2])) { -remotes-packages } } edit:completion:arg-completer[kcp] = $complete~