Skip to content

Instantly share code, notes, and snippets.

@techpeace
Created October 11, 2010 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techpeace/621296 to your computer and use it in GitHub Desktop.
Save techpeace/621296 to your computer and use it in GitHub Desktop.
#! /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