January 2004
Intermediate to advanced
368 pages
7h 25m
English
This is a fun little script for Mac OS X users who like to work in the Terminal application. Instead of having to use the Terminal > Window Settings > Window dialog box to set or change the window title, you can use this script to change it whenever you like.
#! /bin/sh # titleterm - Tells the Mac OS X Terminal application to change its title # to the value specified as an argument to this succinct script. if [ $# -eq 0 ]; then echo "Usage: $0 title" >&2 exit 1 else echo -ne "\033]0;$1\007" fi exit 0
The Terminal application has a variety of different secret escape codes that it understands, and the titleterm script sends a sequence of ESC ] 0; title BEL, which changes the title ...
Read now
Unlock full access