elvish_config/lib/moi/completion/archiver.elv

31 lines
452 B
Plaintext
Raw Normal View History

2021-10-13 18:49:48 +00:00
var options = [
2020-03-13 14:03:36 +00:00
z
l
x
b
g
h
]
2021-10-13 18:49:48 +00:00
var description = [
2020-03-13 14:03:36 +00:00
&z='zst compression (default)'
&l='lz4 compression'
&x='xz compression'
&b='bz2 compression'
&g='gzip compression'
&h='display help'
]
fn -options {
2021-12-11 21:09:02 +00:00
each {|o|
2020-03-13 14:03:36 +00:00
put [&short=$o &desc=$description[$o]]
} $options
}
2021-12-11 21:09:02 +00:00
fn complete {|@argv|
2020-03-13 14:03:36 +00:00
edit:complete-getopt $argv [(-options)] [ $edit:complete-filename~ ...]
}
2021-10-13 18:49:48 +00:00
set edit:completion:arg-completer[archiver] = $complete~