elvish_config/lib/moi/completion/kcp.elv
2020-07-22 11:24:43 +02:00

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