Created
June 5, 2018 15:21
-
-
Save stuyam/1ebe9e59204297ed1f04c629f9ecc735 to your computer and use it in GitHub Desktop.
This file contains 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
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