13 lines
309 B
Plaintext
13 lines
309 B
Plaintext
use moi/util/condition
|
|
use moi/util/file
|
|
|
|
extensions = [ tar bz2 zip gz lz4 sz xz zst rar ]
|
|
|
|
fn complete [@argv]{
|
|
local:m = $argv[-1]
|
|
local:type = (condition:cset (eq $m '') prefix deep-prefix)
|
|
file:match-extensions &type=$type $m $@extensions
|
|
}
|
|
|
|
edit:completion:arg-completer[desarchiver] = $complete~
|