Skip to content

Instantly share code, notes, and snippets.

@stuyam
Created June 5, 2018 15:21
Show Gist options
  • Save stuyam/1ebe9e59204297ed1f04c629f9ecc735 to your computer and use it in GitHub Desktop.
Save stuyam/1ebe9e59204297ed1f04c629f9ecc735 to your computer and use it in GitHub Desktop.
SELECTED_TAB=$(osascript -e "tell application \"Terminal\" to get selected tab of window 1")
ALL_ARGS="'$*'"
if [[ $ALL_ARGS =~ stg|staging ]];
then
osascript -e "tell application \"Terminal\" to set background color of $SELECTED_TAB to {65280, 49408, 1792}";
osascript -e "tell application \"Terminal\" to set normal text color of $SELECTED_TAB to {0, 0, 0}"
else
osascript -e "tell application \"Terminal\" to set background color of $SELECTED_TAB to {56320, 13568, 17664}";
osascript -e "tell application \"Terminal\" to set normal text color of $SELECTED_TAB to {65280, 65280, 65280}"
fi
/usr/local/bin/heroku $@;
osascript -e "tell application \"Terminal\" to set background color of $SELECTED_TAB to {0, 0, 0}";
osascript -e "tell application \"Terminal\" to set normal text color of $SELECTED_TAB to {0, 63993, 0}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment