elvish_config/lib/moi/completion/desarchiver.elv
2020-03-13 15:03:36 +01:00

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~