Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A shell script to set Terminal window colors per SSH host' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A shell script to set Terminal window colors per SSH host
Authored by: kenahoo on Aug 02, '05 05:41:20PM

Rather than encoding the Escape and Bel characters right in the script, you can use

   echo -n -e "\e]0;newWindowName\a"

. This will confuse people less than trying to remember ASCII mappings.



[ Reply to This | # ]
A shell script to set Terminal window colors per SSH host
Authored by: jdsmith on Aug 03, '05 01:45:57PM
Really? My OSX-native tcsh built-in echo does not understand "-e", or I would have gone that route:
% echo -n -e "\e]0;newWindowName\a"
-e \e]0;newWindowName\a

Aha, but I see the default bash built-in echo does permit this, so I should modify the script. Since I use tcsh as my default shell, I wasn't aware of this (a good tip on its own). I'll submit a revision.

[ Reply to This | # ]

printf
Authored by: sjk on Aug 24, '05 08:55:57PM

Or use the printf command instead of echo.



[ Reply to This | # ]