<?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: Bash Shell PS1: 10 Examples to Make Your Linux Prompt like Angelina Jolie</title>
	<atom:link href="http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/</link>
	<description>Guides, HowTos and Tips for Technology Geeks</description>
	<lastBuildDate>Sat, 13 Mar 2010 16:55:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: MYSQL_PS1: 6 Examples to make your mysql&#62; prompt like Angelina Jolie</title>
		<link>http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/comment-page-1/#comment-36123</link>
		<dc:creator>MYSQL_PS1: 6 Examples to make your mysql&#62; prompt like Angelina Jolie</dc:creator>
		<pubDate>Wed, 24 Feb 2010 06:03:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=167#comment-36123</guid>
		<description>[...] while back we tried to customize unix prompt to look like Angelina [...]</description>
		<content:encoded><![CDATA[<p>[...] while back we tried to customize unix prompt to look like Angelina [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: longshot</title>
		<link>http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/comment-page-1/#comment-35958</link>
		<dc:creator>longshot</dc:creator>
		<pubDate>Tue, 23 Feb 2010 15:26:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=167#comment-35958</guid>
		<description>I like setting the title bar in my prompt so it shows where I&#039;m logged in and in what directory.  I use a function to set my multi-line prompt with:

function bash_prompt
{
local TITLEBAR=&#039;\[\e]0;\u@\h:\w07\]&#039;
local TEXT=&quot;\[\e[1;36m\]&quot;
local RED=&quot;\[\e[0;31m\]&quot;
local DEF=&quot;\[\e[0;37m\]&quot;
local NONE=&quot;\[\e[0m\]&quot;

PS1=&quot;${TITLEBAR}\n\
${DEF}[${TEXT}\d${DEF}@${TEXT}\T${DEF}]\n\
${DEF}{${TEXT}\u${DEF}@${TEXT}\h${DEF}}\n\
${DEF}\n\
${DEF}(${RED}jobs:\j/\!${DEF}&#124;${RED}cmd#:\!${DEF}&#124;${RED}\\\$?:\$?${DEF}) \$${NONE} &quot;
}</description>
		<content:encoded><![CDATA[<p>I like setting the title bar in my prompt so it shows where I&#8217;m logged in and in what directory.  I use a function to set my multi-line prompt with:</p>
<p>function bash_prompt<br />
{<br />
local TITLEBAR=&#8217;\[\e]0;\u@\h:\w07\]&#8217;<br />
local TEXT=&#8221;\[\e[1;36m\]&#8221;<br />
local RED=&#8221;\[\e[0;31m\]&#8221;<br />
local DEF=&#8221;\[\e[0;37m\]&#8221;<br />
local NONE=&#8221;\[\e[0m\]&#8221;</p>
<p>PS1=&#8221;${TITLEBAR}\n\<br />
${DEF}[${TEXT}\d${DEF}@${TEXT}\T${DEF}]\n\<br />
${DEF}{${TEXT}\u${DEF}@${TEXT}\h${DEF}}\n\<br />
${DEF}\n\<br />
${DEF}(${RED}jobs:\j/\!${DEF}|${RED}cmd#:\!${DEF}|${RED}\\\$?:\$?${DEF}) \$${NONE} &#8221;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilyas</title>
		<link>http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/comment-page-1/#comment-34789</link>
		<dc:creator>Ilyas</dc:creator>
		<pubDate>Mon, 15 Feb 2010 17:00:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=167#comment-34789</guid>
		<description>What if I want to get the real time with t. Something same like tick tock of the clock, everyone second, minute should be displayed in real time.</description>
		<content:encoded><![CDATA[<p>What if I want to get the real time with t. Something same like tick tock of the clock, everyone second, minute should be displayed in real time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abe</title>
		<link>http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/comment-page-1/#comment-29357</link>
		<dc:creator>abe</dc:creator>
		<pubDate>Wed, 13 Jan 2010 14:44:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=167#comment-29357</guid>
		<description>I like almost every post I&#039;ve ever seen. Well done.</description>
		<content:encoded><![CDATA[<p>I like almost every post I&#8217;ve ever seen. Well done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominique Michel</title>
		<link>http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/comment-page-1/#comment-12439</link>
		<dc:creator>Dominique Michel</dc:creator>
		<pubDate>Thu, 09 Jul 2009 05:37:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=167#comment-12439</guid>
		<description>@Ramesh Nataraja

I made some bug changes. The first version is not updating the date when the time is running, this one will do it:

export PS1=&quot;\e[01;33m# \e[01;35m\D{%A %e %B %G %R %Z} \e[00;31m\u\e[01;32m@\e[00;31m\h \e[01;33m\w :\e[00m\n&quot;</description>
		<content:encoded><![CDATA[<p>@Ramesh Nataraja</p>
<p>I made some bug changes. The first version is not updating the date when the time is running, this one will do it:</p>
<p>export PS1=&#8221;\e[01;33m# \e[01;35m\D{%A %e %B %G %R %Z} \e[00;31m\u\e[01;32m@\e[00;31m\h \e[01;33m\w :\e[00m\n&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramesh Natarajan</title>
		<link>http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/comment-page-1/#comment-12435</link>
		<dc:creator>Ramesh Natarajan</dc:creator>
		<pubDate>Thu, 09 Jul 2009 04:33:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=167#comment-12435</guid>
		<description>&lt;strong&gt;@Dominique Michel,&lt;/strong&gt;

I agree with you. Doug&#039;s idea is awesome and excellent out-of-the-box thinking. Thanks for sharing your cool PS1 prompt with us.

&lt;strong&gt;@Agn,&lt;/strong&gt;

Excellent. It works great. I always had the habit of using grep -v in that situation. I should start changing my habit and use [ ] in the grep. Thanks for sharing it with us.</description>
		<content:encoded><![CDATA[<p><strong>@Dominique Michel,</strong></p>
<p>I agree with you. Doug&#8217;s idea is awesome and excellent out-of-the-box thinking. Thanks for sharing your cool PS1 prompt with us.</p>
<p><strong>@Agn,</strong></p>
<p>Excellent. It works great. I always had the habit of using grep -v in that situation. I should start changing my habit and use [ ] in the grep. Thanks for sharing it with us.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: agn</title>
		<link>http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/comment-page-1/#comment-12327</link>
		<dc:creator>agn</dc:creator>
		<pubDate>Mon, 06 Jul 2009 12:20:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=167#comment-12327</guid>
		<description>You can avoid &#039;ps aux &#124; grep httpd &#124; grep -v grep&#039; by using &#039;ps aux &#124; grep [h]ttpd&#039; .</description>
		<content:encoded><![CDATA[<p>You can avoid &#8216;ps aux | grep httpd | grep -v grep&#8217; by using &#8216;ps aux | grep [h]ttpd&#8217; .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominique Michel</title>
		<link>http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/comment-page-1/#comment-8408</link>
		<dc:creator>Dominique Michel</dc:creator>
		<pubDate>Sun, 12 Apr 2009 16:43:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=167#comment-8408</guid>
		<description>Thank you all ! And especially Ramesh, LKeeper and Doug !

It was very funny to play with $PS1. Here is the result for now, I think that my one line PS1 is worth sharing:

export PS1=&quot;\e[01;33m# \e[01;35m`date +&#039;%A %d %B %Y, %X %Z(%:::z)&#039;` \e[00;31m\u\e[01;32m@\e[00;31m\]\h \e[01;33m\w :\e[00m\n&quot;

It show a # (cool!), the localized date and time with the timezone, as well than the user&#039;s name and location. I put &quot; :&quot; at the end of the line in order to be in agreement with my locale. Last is a line return.</description>
		<content:encoded><![CDATA[<p>Thank you all ! And especially Ramesh, LKeeper and Doug !</p>
<p>It was very funny to play with $PS1. Here is the result for now, I think that my one line PS1 is worth sharing:</p>
<p>export PS1=&#8221;\e[01;33m# \e[01;35m`date +'%A %d %B %Y, %X %Z(%:::z)'` \e[00;31m\u\e[01;32m@\e[00;31m\]\h \e[01;33m\w :\e[00m\n&#8221;</p>
<p>It show a # (cool!), the localized date and time with the timezone, as well than the user&#8217;s name and location. I put &#8221; :&#8221; at the end of the line in order to be in agreement with my locale. Last is a line return.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramesh</title>
		<link>http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/comment-page-1/#comment-8312</link>
		<dc:creator>Ramesh</dc:creator>
		<pubDate>Sat, 11 Apr 2009 06:44:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=167#comment-8312</guid>
		<description>&lt;strong&gt;@Alejandro, MrSpider, Sam,&lt;/strong&gt;

Thanks for sharing your PS1 prompt.
&lt;code&gt;&#160;&lt;/code&gt;

&lt;strong&gt;@Ked,&lt;/strong&gt;

Like ces pointed out, \w or \W in a PS1 will always display ~ for the home directory instead of expanding it. I don&#039;t think there is any way to change that.
&lt;code&gt;&#160;&lt;/code&gt;

&lt;strong&gt;@Angelo,&lt;/strong&gt;

Thanks a lot for pointing it out. I&#039;ve corrected it. %m is for month. %M is for minutes. I&#039;ve changed the prompt mentioned in #2 to the following.

&lt;pre&gt;
# export PS1=&quot;\u@\h [\$(date +%k:%M:%S)]&gt; &quot;
&lt;/pre&gt;
&lt;code&gt;&#160;&lt;/code&gt;

&lt;strong&gt;@Quinn,&lt;/strong&gt;

Thanks for the suggestions. On my system, it worked properly even without enclosing the PS1 without the \[ and \]. I&#039;ll definitely remember your suggestion, when I get into trouble, if it doesn&#039;t work.</description>
		<content:encoded><![CDATA[<p><strong>@Alejandro, MrSpider, Sam,</strong></p>
<p>Thanks for sharing your PS1 prompt.<br />
<code>&nbsp;</code></p>
<p><strong>@Ked,</strong></p>
<p>Like ces pointed out, \w or \W in a PS1 will always display ~ for the home directory instead of expanding it. I don&#8217;t think there is any way to change that.<br />
<code>&nbsp;</code></p>
<p><strong>@Angelo,</strong></p>
<p>Thanks a lot for pointing it out. I&#8217;ve corrected it. %m is for month. %M is for minutes. I&#8217;ve changed the prompt mentioned in #2 to the following.</p>
<pre>
# export PS1="\u@\h [\$(date +%k:%M:%S)]> "
</pre>
<p><code>&nbsp;</code></p>
<p><strong>@Quinn,</strong></p>
<p>Thanks for the suggestions. On my system, it worked properly even without enclosing the PS1 without the \[ and \]. I&#8217;ll definitely remember your suggestion, when I get into trouble, if it doesn&#8217;t work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Quinn Taylor</title>
		<link>http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/comment-page-1/#comment-8006</link>
		<dc:creator>Quinn Taylor</dc:creator>
		<pubDate>Mon, 06 Apr 2009 23:32:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=167#comment-8006</guid>
		<description>When setting prompt colors (whether with tputs or directly) be sure to put \[ and \] around the change. If you leave it off, poor bash gets confused about where your line should wrap, and strange things start to happen.

For example, the following modifications are equivalent, but the latter eliminates strange behaviors:

$ export PS1=&quot;\e[0;34m\u@\h \w&gt; \e[m&quot;
$ export PS1=&quot;\[\e[0;34m\]\u@\h \w&gt; \[\e[m\]&quot;

Thanks for the post, it was handy!</description>
		<content:encoded><![CDATA[<p>When setting prompt colors (whether with tputs or directly) be sure to put \[ and \] around the change. If you leave it off, poor bash gets confused about where your line should wrap, and strange things start to happen.</p>
<p>For example, the following modifications are equivalent, but the latter eliminates strange behaviors:</p>
<p>$ export PS1=&#8221;\e[0;34m\u@\h \w&gt; \e[m"<br />
$ export PS1="\[\e[0;34m\]\u@\h \w&gt; \[\e[m\]&#8221;</p>
<p>Thanks for the post, it was handy!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
