Apply .env files to your current shell
Go to file
Hamcha 1c28fddbe7
check in
2020-01-21 17:18:58 +01:00
src check in 2020-01-21 17:18:58 +01:00
.gitignore check in 2020-01-21 17:18:58 +01:00
Cargo.lock check in 2020-01-21 17:18:58 +01:00
Cargo.toml check in 2020-01-21 17:18:58 +01:00
README.md check in 2020-01-21 17:18:58 +01:00

README.md

osenv

Apply .env files to shell environments!

What is it

Given a .env like this:

DB_USER=admin
DB_PASSWORD=changeme

it will generate scripts for bash (and likely other *sh) and powershell, like:

Powershell

Example output:

$env:DB_USER = "admin"; $env:DB_PASSWORD = "changeme"

Use osenv like this:

osenv -s ps1 | iex

*nix shell

Example output:

export DB_USER=admin
export DB_PASSWORD=changeme

Run osenv like this:

eval $(osenv)