elvish_config/lib/moi/completion/kcp.elv

42 lines
403 B
Plaintext

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) {
explode $options
} elif (and (== $c 3) (has-value $np $argv[-2])) {
-remotes-packages
}
}
edit:completion:arg-completer[kcp] = $complete~