elvish_config/lib/moi/completion/use.elv

25 lines
395 B
Plaintext
Raw Normal View History

2021-08-27 20:06:49 +00:00
var libdir = $E:HOME/.config/elvish/lib
var builtin_modules = [
2021-08-24 18:45:25 +00:00
builtin
epm
file
math
path
re
readline-binding
store
str
unix
]
edit:completion:arg-completer[use] = [@argv]{
use str
use path
all $builtin_modules
put $libdir/**.elv | each [f]{
if (path:is-regular $f) {
str:trim-prefix $f $libdir/
}
} | each [f]{ str:trim-suffix $f .elv }
}