-
Notifications
You must be signed in to change notification settings - Fork 66
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
Environment variable integration #16
Comments
I created a pull request for (getenv) and (setenv). It seems omitting the '!' is the way you're going with other things. I agree with this, as it's cumbersome to type and this is a shell--lots of stuff is going to be mutable. I think more needs to be done though. I haven't fully thought this through, but it seems closh will need shell local and exported (environment) variables just like other shells. Any thoughts on how to handle that? As for setting an environment variable only for a child process, closh can do the same thing fish does and just rely on an external
This works, but I can't help thinking there is a more elegant solution. |
I like the reasoning behind omitting the bang. Sweet, that's a pretty nifty trick with the |
Implemented in the PR |
As for now one can use the JS interop to access and set environment variables:
Maybe we want to introduce helper functions like
(setenv)
or(setenv!)
and(getenv)
?Another thing is setting an env variable only for the child process, alternative to bash:
NODE_ENV=production npm start
The text was updated successfully, but these errors were encountered: