<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Mac OS X change the terminal window title</title>
	<atom:link href="http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/</link>
	<description>Computer and technology tutorials and guides</description>
	<lastBuildDate>Fri, 10 Feb 2012 12:22:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: moonpixel</title>
		<link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/comment-page-1/#comment-52229</link>
		<dc:creator>moonpixel</dc:creator>
		<pubDate>Thu, 01 Dec 2011 04:47:05 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-52229</guid>
		<description>nice, using it like this
#!/usr/bin/env bash                                                                                                                                                                                                                        
echo -n -e &quot;33]0;$107&quot;
exit 0</description>
		<content:encoded><![CDATA[<p>nice, using it like this<br />
#!/usr/bin/env bash<br />
echo -n -e &#8220;33]0;$107&#8243;<br />
exit 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pedro Furlanetto</title>
		<link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/comment-page-1/#comment-51648</link>
		<dc:creator>Pedro Furlanetto</dc:creator>
		<pubDate>Sun, 13 Nov 2011 12:36:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-51648</guid>
		<description>I found this one to be the most convenient:

export PS1=&quot;\$(echo -n -e &#039;33]0;\W07&#039;)\W \u $ &quot;</description>
		<content:encoded><![CDATA[<p>I found this one to be the most convenient:</p>
<p>export PS1=&#8221;\$(echo -n -e &#8216;33]0;\W07&#8242;)\W \u $ &#8220;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julie</title>
		<link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/comment-page-1/#comment-51404</link>
		<dc:creator>Julie</dc:creator>
		<pubDate>Mon, 07 Nov 2011 18:57:12 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-51404</guid>
		<description>Awesome. Perfect. Thanks!</description>
		<content:encoded><![CDATA[<p>Awesome. Perfect. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Tumanov</title>
		<link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/comment-page-1/#comment-46263</link>
		<dc:creator>Ivan Tumanov</dc:creator>
		<pubDate>Wed, 09 Feb 2011 19:31:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-46263</guid>
		<description>This works in an interesting way - 

export PS1=&quot;$(echo -n -e &quot;33]0;w07&quot;)w $&quot;

executes the echo command to set the tab title to w and then shows a regular w $ prompt.</description>
		<content:encoded><![CDATA[<p>This works in an interesting way &#8211; </p>
<p>export PS1=&#8221;$(echo -n -e &#8220;33]0;w07&#8243;)w $&#8221;</p>
<p>executes the echo command to set the tab title to w and then shows a regular w $ prompt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/comment-page-1/#comment-36951</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 20 Jan 2010 10:09:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-36951</guid>
		<description>In bash, you can do this:

PS1=&quot;33]0;H07h:W u$ &quot;

The PS1 prompt gets printed at every command (see &#039;man bash&#039;). Thus, the window title gets set at each display of the prompt -- so if you log out of one shell, the prompt from the old shell is displayed and re-sets the window title.

This method also gets you all the bash prompt expansions (see &#039;man bash&#039;, search for PROMPTING), like H which expands to the full hostname and h which expands to the hostname up to the first . and so on.</description>
		<content:encoded><![CDATA[<p>In bash, you can do this:</p>
<p>PS1=&#8221;33]0;H07h:W u$ &#8221;</p>
<p>The PS1 prompt gets printed at every command (see &#8216;man bash&#8217;). Thus, the window title gets set at each display of the prompt &#8212; so if you log out of one shell, the prompt from the old shell is displayed and re-sets the window title.</p>
<p>This method also gets you all the bash prompt expansions (see &#8216;man bash&#8217;, search for PROMPTING), like H which expands to the full hostname and h which expands to the hostname up to the first . and so on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/comment-page-1/#comment-35746</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 20 Nov 2009 16:48:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-35746</guid>
		<description>I put this in my .bashrc
echo -n -e &quot;33]0;`hostname`07
Then on each tab as I log into a different machine (It has to have that line in the .bashrc of the user/machine I&#039;m logging into) it sets the title as I log in to the machine, so all the tabs are correct.
And to recover on logout, I put this in the .bash_logout:

prev=`who am i &#124; sed -e &quot;s/.*((.*))/1/&quot;`
if test ! x$prev = x 
then
    echo -n -e &quot;33]0;$prev07&quot;
fi





alias sett=&quot;echo -n -e &quot;33]0;`hostname`07&quot;
</description>
		<content:encoded><![CDATA[<p>I put this in my .bashrc<br />
echo -n -e &#8220;33]0;`hostname`07<br />
Then on each tab as I log into a different machine (It has to have that line in the .bashrc of the user/machine I&#8217;m logging into) it sets the title as I log in to the machine, so all the tabs are correct.<br />
And to recover on logout, I put this in the .bash_logout:</p>
<p>prev=`who am i | sed -e &#8220;s/.*((.*))/1/&#8221;`<br />
if test ! x$prev = x<br />
then<br />
    echo -n -e &#8220;33]0;$prev07&#8243;<br />
fi</p>
<p>alias sett=&#8221;echo -n -e &#8220;33]0;`hostname`07&#8243;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/comment-page-1/#comment-35745</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 20 Nov 2009 16:33:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-35745</guid>
		<description>Perfect, I put this in my .bashrc and the title changes on each tab as I login

echo -n -e &quot;33]0;`hostname`07&quot;

The only problem I have is that it doesn&#039;t change back, when I get logged out, so I have an alias to reset it...

alias sett=&quot;echo -n -e &quot;33]0;`hostname`07&quot;

</description>
		<content:encoded><![CDATA[<p>Perfect, I put this in my .bashrc and the title changes on each tab as I login</p>
<p>echo -n -e &#8220;33]0;`hostname`07&#8243;</p>
<p>The only problem I have is that it doesn&#8217;t change back, when I get logged out, so I have an alias to reset it&#8230;</p>
<p>alias sett=&#8221;echo -n -e &#8220;33]0;`hostname`07&#8243;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: luca</title>
		<link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/comment-page-1/#comment-29781</link>
		<dc:creator>luca</dc:creator>
		<pubDate>Mon, 27 Apr 2009 07:48:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-29781</guid>
		<description>Thanks, works like a charm. However, it doesn&#039;t change the title of a tab, just that of the main windows in which many tabs are contained - so it&#039;s useless to be able to see at a glance which terminal is the one you&#039;re looking for. </description>
		<content:encoded><![CDATA[<p>Thanks, works like a charm. However, it doesn&#8217;t change the title of a tab, just that of the main windows in which many tabs are contained &#8211; so it&#8217;s useless to be able to see at a glance which terminal is the one you&#8217;re looking for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: des09</title>
		<link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/comment-page-1/#comment-24921</link>
		<dc:creator>des09</dc:creator>
		<pubDate>Sat, 08 Nov 2008 20:46:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-24921</guid>
		<description>How would you set the tab title when running multiple tabs?</description>
		<content:encoded><![CDATA[<p>How would you set the tab title when running multiple tabs?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached (User agent is rejected)
Database Caching 5/16 queries in 0.834 seconds using memcached
Object Caching 398/401 objects using memcached

Served from: www.tech-recipes.com @ 2012-02-10 06:42:37 -->
