tdenniston / bish

Bish is a language that compiles to Bash. It's designed to give shell scripting a more comfortable and modern feel.
MIT License
1.48k stars 36 forks source link

How about add BISH_USERLIB to extend BISH_STDLIB? #43

Closed qinshulei closed 9 years ago

qinshulei commented 9 years ago

Hi tdenniston ,

Thank you for your great bish .

I find that we can override the default standard library path by setting the via BISH_STDLIB. But I think we don't need to override it normally.And we only need to extend it. So I suggest that add via BISH_USERLIB for this.

Best regards, Shulei.

tdenniston commented 9 years ago

Glad you like bish!

Do you need to extend the standard library, or do you just need the ability to use common functions between bish files? I suspect that best way to solve your problem is to allow importing other bish files (see issue #31).

qinshulei commented 9 years ago

Do you need to extend the standard library?

I think I don't need to extend the standard library.

you just need the ability to use common functions between bish files?

Yes,we may have serveral bish files for common functions.

I suspect that best way to solve your problem is to allow importing other bish files ?

Yes,the best way to solve this is to allow importing other bish files. And in compiling to bash, it should only import the necessary functions which is really used in main script, just like the standard library does.

tdenniston commented 9 years ago

Ok, importing other bish modules is now supported. Closing this issue, but please see #31 for an explanation of how it works. If there are issues, please report them in a new issue or in #31.