beakerbrowser / webterm

Specs and discussions for the Webterm environment
9 stars 2 forks source link

Environment Variables #6

Open matthewauld opened 4 years ago

matthewauld commented 4 years ago

As it currently stands - environment variables are specific to the drive you are working in, and session based, limiting their usefulness. I propose a .env or .webterm (name not really important) file that contains a JSON object that is automatically read and loaded into webterm's environment variables at launch, and kept in your system drive.

I would also like to explore having drive-specific .env in a drive that are loaded for commands in that drive only, that would be auto loaded on opening a web terminal in that drive.

These could be used for custom configs, settings, preferences, etc.

The global drive is fairly straightforward, but the local one is less so. What happens if you navigate to another drive - would locally-set variables disappear? What happens if the local variables overwrite the global ones? This could cause annoyances and at worst security issues. Not sure the best way to resolve, but it seems such a useful and integral part of a terminal environment, so I thought I would bring it up.

pfrazee commented 4 years ago

Yeah I'm +1 for the global one and suggest we wait to understand the command-space a little better before we add it there, agree on all you're thinking about the complexities of the local ones. The place to put the global one would be hyper://system/webterm/.env