Skip to content

Instantly share code, notes, and snippets.

@manchuck
Forked from adamwalzer/README.md
Created March 4, 2016 15:42
Show Gist options
  • Save manchuck/68beb5943ddd93116cd4 to your computer and use it in GitHub Desktop.
Save manchuck/68beb5943ddd93116cd4 to your computer and use it in GitHub Desktop.
Bash Background Changer for Directory Navigation
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