13 lines
308 B
Plaintext
13 lines
308 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:set (eq $m '') prefix deep-prefix)
|
||
|
file:match-extensions &type=$type $m $@extensions
|
||
|
}
|
||
|
|
||
|
edit:completion:arg-completer[desarchiver] = $complete~
|