elvish
elvish copied to clipboard
Allow changing the module search path
I'd like to use elvish for some basic scripts in some Docker containers. Naturally I don't have a ~/.elvish/lib
folder at hand, so I was wondering if there's a way to override the lookup path for modules.
Ideally I would like to pass it to elvish (e.g. elvish -modules-path=/opt/elvish-modules
) so I can write reusable code and import it with use
. It might make sense to apply the same to rc.elv
, but for my purposes that would not be necessary.
If there's a way to do this already, I cannot find it.
This would be very handy for Elvish in general, as I have tons of bash scripts throughout our infrastructre that I'd rather write in Elvish 😉
Elvish doesn't have that API but it sounds like a good idea.