Apply .env files to your current shell
Go to file
Hamcha cb65dcd72a
little refactor+cleanup
2020-01-21 17:42:51 +01:00
src little refactor+cleanup 2020-01-21 17:42:51 +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 Correct powershell output on readme 2020-01-21 17:30:25 +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)