oneenv

Crates.iooneenv
lib.rsoneenv
version0.1.0
sourcesrc
created_at2024-06-19 09:44:54.434001
updated_at2024-06-19 09:44:54.434001
descriptionOne Env: manage local env vars in a single file
homepage
repositoryhttps://github.com/sergey-melnychuk/oneenv
max_upload_size
id1276702
size3,929
Sergey Melnychuk (sergey-melnychuk)

documentation

README

ONE ENV

All local env vars in a single file.

cargo build --release
cp ./target/release/oneenv ~/.cargo/bin/
$ vim ~/.zshrc
## https://superuser.com/a/735969
precmd() {
  oneenv | while read -r line; do eval "export $line"; done
}
$ cat ~/.oneenv 
/Users/john.doe/this:
API_KEY=qweqweqwe

/Users/john.doe/that:
ANSWER=42
$ cd /Users/john.doe/this
$ echo "https://cool.api/${API_KEY}"
https://cool.api/qweqweqwe

$ cd /Users/john.doe/that
$ echo $ANSWER
42
Commit count: 2

cargo fmt