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~
|
2021-08-24 18:44:01 +00:00
|
|
|
|