This content has been included from the project-env-shell Github repository.
Project-Env Shell
The Project-Env Shell integration application allows to use tools setup by the Project-Env CLI in a shell environment. See Project-Env for more details.
Installation
Homebrew
brew install --cask project-env/tap/project-env-shell
Shell integration examples
ZSH
To use Project-Env managed tools in your ZSH shell, create the following script:
#!/bin/zsh
if [[ ! -f "project-env.toml" ]]; then
zsh
else
project-env-shell --config-file="project-env.toml" --output-template=zsh --output-file=.project-env
source .project-env
zsh
fi
To use the tools, you now only need to call the script to setup the shell.
For example, if you want to start your IntelliJ Terminal with Project-Env tools setup, configure the following command in the Terminal settings:
/bin/zsh --login -c <path to script>
Cygwin (started through Windows CMD)
To use Project-Env managed tools in your Cygwin shell, create the following script:
@echo off
if not exist project-env.toml (
bash.exe
) else (
project-env-shell.exe --config-file=project-env.toml --output-template=cygwin --output-file=.project-env
dos2unix .project-env
bash.exe --init-file .project-env
)
To use the tools, you now only need to call the script to setup the shell.