Direnv: Difference between revisions
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
brew install direnv | brew install direnv | ||
</syntaxhighlight> | |||
=Configuration= | |||
{{External|https://direnv.net/docs/hook.html#bash}} | |||
Add to <code>.bashrc</code>: | |||
<syntaxhighlight lang='bash'> | |||
eval "$(direnv hook bash)" | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 02:18, 16 February 2022
External
Internal
Overview
Installation
brew install direnv
Configuration
Add to .bashrc
:
eval "$(direnv hook bash)"
Configuration
Create an .envrc
file in the directory in question:
export JAVA_HOME="$(/usr/libexec/java_home -v 11)"
PATH_add "${JAVA_HOME}/bin"