-
-
Save manchuck/68beb5943ddd93116cd4 to your computer and use it in GitHub Desktop.
Bash Background Changer for Directory Navigation
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
export CLICOLOR=1 | |
export TERM=xterm-256color | |
function cd() { | |
builtin cd "$@"; | |
shopt -s nocasematch | |
if [[ "$PWD" == *"/Users/adamwalzer/Sites/cmwn-games-artifact"* ]] | |
then | |
echo -e "\033]50;SetProfile=Dev\a" | |
elif [[ "$PWD" == *"/Users/adamwalzer/Sites/cmwn-games-prod"* ]] | |
then | |
echo -e "\033]50;SetProfile=Prod\a" | |
elif [[ "$PWD" == *"/Users/adamwalzer/Sites/cmwn-games-staging"* ]] | |
then | |
echo -e "\033]50;SetProfile=Staging\a" | |
elif [[ "$PWD" == *"/Users/adamwalzer/Sites/js-interactive-library"* ]] | |
then | |
echo -e "\033]50;SetProfile=Lib\a" | |
else | |
echo -e "\033]50;SetProfile=Gaming\a" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment