Browse files

Set the terminal title in OS X, stolen from http://tinyurl.com/5u9wfr

  • Loading branch information...
1 parent 73c601a commit 78f337e52d8a2b04deee544b39350c95dcbc21f5 @ryanfb committed Aug 18, 2008
Showing with 8 additions and 0 deletions.
  1. +8 −0 07_title
View
8 07_title
@@ -0,0 +1,8 @@
+# Set the terminal title in OS X, stolen from http://tinyurl.com/5u9wfr
+case $TERM in (*xterm*|ansi)
+ function settab { print -Pn "\e]1;%n@%m: %~\a" }
+ function settitle { print -Pn "\e]2;%n@%m: %~\a" }
+ function chpwd { settab; settitle }
+ settab; settitle
+ ;;
+esac

0 comments on commit 78f337e

Please sign in to comment.