Last active
August 28, 2021 17:23
-
-
Save premchalmeti/19efc522fc96c47c5344c83dd6853951 to your computer and use it in GitHub Desktop.
Load folder specific `.env` file. Append below the code inside `.bashrc` file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadenv() { | |
if [ -f .env ]; | |
then | |
source .env | |
fi | |
} | |
loadenv | |
function cd() { | |
builtin cd $@ | |
loadenv | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment