elvish icon indicating copy to clipboard operation
elvish copied to clipboard

Allow changing the module search path

Open href opened this issue 5 years ago • 1 comments

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 😉

href avatar Jun 07 '19 18:06 href

Elvish doesn't have that API but it sounds like a good idea.

xiaq avatar Jul 20 '19 13:07 xiaq