Created
October 11, 2010 21:45
-
-
Save techpeace/621296 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
#! /bin/sh | |
help0() | |
{ | |
echo "ERROR: No argument provided." | |
echo "Usage:" | |
echo " `basename $0` \"title\" to provide a new Terminal title." | |
} | |
help2() | |
{ | |
echo "ERROR: Too many arguments provided." | |
echo "Usage:" | |
echo " `basename $0` \"title\" to provide a new Terminal title." | |
} | |
if [ $# -eq 0 ] | |
then | |
help0; | |
elif [ $# -eq 1 ] | |
then | |
osascript -e "tell application \"Terminal\" to set | |
custom title of window 1 to \"$1\"" | |
elif [ $# -gt 1 ] | |
then | |
help2; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment