elv-lib/completion/kcp.elv

42 lines
409 B
Plaintext
Raw Normal View History

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