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