This will install `osenv-bin` in your cargo bin folder (don't forget to add it to `PATH`!)
You can already use it, with some caveats (having to specify the full string, like `osenv-bin | iex`), but you should just make a function and add it to your shell's profile file.
### Add to profile
If you're using sh/bash/zsh, add this to your .bashrc/.zshrc/etc:
```sh
osenv() {
RES=$(osenv-bin $@)
if [ $? -eq 0 ]; then
eval $RES
else
echo $RES
fi
}
```
If you're using Powershell, add this to your `$profile`:
```ps1
function osenv {
$cmd = osenv-bin @Args
if ($?) {
$cmd | Invoke-Expression
}
else {
Write-Output $cmd
}
}
```
If you rather have them as script to source, you can find them in `scripts` in this repo.
If you want to enhance osenv to add a special "add to profile" command, or make some scripts that do (easy in powershell, not so much in the shell world), contributions are highly appreciated!