elvish_config/lib/moi/completion/desarchiver.elv
2021-08-24 20:44:01 +02:00

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~