-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multiline support #3
Conversation
I think we should only remove quotes when they are at the beginning and end.
|
@pksunkara |
We need to look into how other dotenv libraries support them. Those are what we need to be consistent with, not bash IIUC. |
puh... I am not sure about that, but I certainly want to have BASH compatible mode at least as an option. With a short search, I found the main following dotenv libraries (next to this one),
They both also support back-tics as a third valid quoting style, which again is not BASH compatible, as back-tics have special meaning there. In short... it's complicated. ;-) |
Wow, first PR! This sounds like it warrants some more discussion so I will hold off on merging for now. Thanks @hoijui for this! |
I don't think the compatibility issue warrants not merging this PR. |
I also think it would be bad, to use an BASH inspired software but not be BASH compatible as much as possible. Bash is, in my eyes, also a dotenv library, and it is likely the most used one. This code gives us quite good BASH compatibility, and to not keep it at least as an option, makes no sense to me. |
My question is, why would we need to be bash compatible? Are there scenarios where we load the env files directly in bash? And if we are talking about bash, why are we not looking at other shells like zsh? |
A very clear: yes
BASH is surely the most important, because most widely used shell, yet looking at other shells in addition to it might also make sense, at least if it does not introduce incompatibilities. What - if not shell compatibility - is the benefit of env files over something like JSON, YAML, TOML, XML, ...? |
You are probably right, but I would still like an example scenario explained because I have never done it personally because all these other libraries are not bash compatible |
Hello. I noticed that your fork supports the multi-line environment. It's very convenient. test.shexport MULTILINE="{
'key': 'value'
}"
$ echo $MULTILINE
{
'key': 'value'
} i am sure this will help the rust community |
|
Any chance this could get merged in if all checks are good? It would be very helpful for certs and keys 😄 Thanks for the contribution! |
A small improvement over PR dotenv-rs/dotenv#63, as suggested in a comment there.
Fixes issue dotenv-rs/dotenv#40