Apply .env files to your current shell
Find a file
2020-01-21 17:30:25 +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 Correct powershell output on readme 2020-01-21 17:30:25 +01:00

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)