<?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: Crazy POWERFUL Bash Prompt</title>
	<atom:link href="http://www.askapache.com/linux-unix/bash-power-prompt.html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.askapache.com/linux-unix/bash-power-prompt.html</link>
	<description>Advanced Web Development</description>
	<lastBuildDate>Mon, 06 Sep 2010 17:04:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: deesto</title>
		<link>http://www.askapache.com/linux-unix/bash-power-prompt.html#comment-154802</link>
		<dc:creator>deesto</dc:creator>
		<pubDate>Tue, 15 Jun 2010 14:04:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/?p=4069#comment-154802</guid>
		<description>&lt;p&gt;&lt;strong&gt;@AskApache&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;thx!  OK, after looking into this, after changing &#8216;&lt;code&gt;sed -nu&lt;/code&gt;&#8216; to &#8216;&lt;code&gt;sed -n&lt;/code&gt;&#8216;, what&#8217;s actually happening is that there _is_ no &lt;code&gt;/proc&lt;/code&gt; system in Darwin, so the &lt;code&gt;eval&lt;/code&gt; command either hangs or throws an error.&lt;br /&gt;
Sucks for us Mac users!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><strong>@AskApache</strong></p>
<p>thx!  OK, after looking into this, after changing &#8216;<code>sed -nu</code>&#8216; to &#8216;<code>sed -n</code>&#8216;, what&#8217;s actually happening is that there _is_ no <code>/proc</code> system in Darwin, so the <code>eval</code> command either hangs or throws an error.<br />
Sucks for us Mac users!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AskApache</title>
		<link>http://www.askapache.com/linux-unix/bash-power-prompt.html#comment-153634</link>
		<dc:creator>AskApache</dc:creator>
		<pubDate>Sat, 12 Jun 2010 07:15:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/?p=4069#comment-153634</guid>
		<description>&lt;p&gt;&lt;strong&gt;@deesto&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Ya some versions (mostly older) of sed don&#8217;t support the -u unbuffered option, I&#8217;ve since removed it since it&#8217;s a bit overkill anyway and multi-platform robustness is always the goal with bash.   It would be helpful if you explained more about what you mean by &#8216;hanging&#8217; without the -u option.  It&#8217;s probably related to something other than the u option, a &lt;code&gt;$ set +xv&lt;/code&gt; will tell us why (please share what you find).&lt;/p&gt;
&lt;p&gt;Thanks for the feedback bro, I use mac&#8217;s all the time too &lt;em&gt;(though I greatly prefer nix.)&lt;/em&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><strong>@deesto</strong></p>
<p>Ya some versions (mostly older) of sed don&#8217;t support the -u unbuffered option, I&#8217;ve since removed it since it&#8217;s a bit overkill anyway and multi-platform robustness is always the goal with bash.   It would be helpful if you explained more about what you mean by &#8216;hanging&#8217; without the -u option.  It&#8217;s probably related to something other than the u option, a <code>$ set +xv</code> will tell us why (please share what you find).</p>
<p>Thanks for the feedback bro, I use mac&#8217;s all the time too <em>(though I greatly prefer nix.)</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maniquí</title>
		<link>http://www.askapache.com/linux-unix/bash-power-prompt.html#comment-152359</link>
		<dc:creator>Maniquí</dc:creator>
		<pubDate>Tue, 08 Jun 2010 02:10:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/?p=4069#comment-152359</guid>
		<description>&lt;p&gt;Hi. I know you insist on &#8220;figure out how this works&#8221;, but bash code is all gibberish to me.&lt;br /&gt;
On .bash_rc, I&#8217;ve added the &#8220;Extreme power prompt&#8221; code from above. Now, my prompt looks like this:&lt;/p&gt;
&lt;p&gt;[2873:2872 0:73] 01:50:46 Tue Jun 08 [user@host:/dev/pts/0 +1] ~&lt;br /&gt;
(1:73)$ &lt;/p&gt;
&lt;p&gt;Please, could you care to explain some chunks of the output?&lt;/p&gt;
&lt;p&gt;[2873:2872 0:73] &lt;- what are this?&lt;/p&gt;
&lt;p&gt;[user@host:/dev/pts/0 +1]  &lt;- what&#039;s the +1 here?&lt;/p&gt;
&lt;p&gt;(1:73)$  &lt;- I understand the 73 here is the number of commands I&#039;ve in the history. What about the 1? And what&#039;s the practical use of this numbers?&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi. I know you insist on &#8220;figure out how this works&#8221;, but bash code is all gibberish to me.<br />
On .bash_rc, I&#8217;ve added the &#8220;Extreme power prompt&#8221; code from above. Now, my prompt looks like this:</p>
<p>[2873:2872 0:73] 01:50:46 Tue Jun 08 [user@host:/dev/pts/0 +1] ~<br />
(1:73)$ </p>
<p>Please, could you care to explain some chunks of the output?</p>
<p>[2873:2872 0:73] &lt;- what are this?</p>
<p>[user@host:/dev/pts/0 +1]  &lt;- what&#039;s the +1 here?</p>
<p>(1:73)$  &lt;- I understand the 73 here is the number of commands I&#039;ve in the history. What about the 1? And what&#039;s the practical use of this numbers?</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deesto</title>
		<link>http://www.askapache.com/linux-unix/bash-power-prompt.html#comment-149131</link>
		<dc:creator>deesto</dc:creator>
		<pubDate>Wed, 26 May 2010 20:16:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/?p=4069#comment-149131</guid>
		<description>&lt;p&gt;thanks for the updated stuff &#8230; but the &#8216;sed -nu&#8217; bit breaks in Darwin bash (OS X), and removing the &#8216;u&#8217; just hangs the prompt.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>thanks for the updated stuff &#8230; but the &#8216;sed -nu&#8217; bit breaks in Darwin bash (OS X), and removing the &#8216;u&#8217; just hangs the prompt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AskApache</title>
		<link>http://www.askapache.com/linux-unix/bash-power-prompt.html#comment-149006</link>
		<dc:creator>AskApache</dc:creator>
		<pubDate>Wed, 26 May 2010 09:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/?p=4069#comment-149006</guid>
		<description>&lt;p&gt;Check out this improvement:  it&#8217;s much faster because it only runs on certain seconds.  And it&#8217;s just being evald!  Very cool.&lt;/p&gt;
&lt;pre&gt;
        # now this is where things gets really farout, figure out how this works and you&#039;ll learn alot
        export AA_P=&quot;export PVE=\&quot;\\033[m\\033[38;5;2m\&quot;\$(( \`sed -nu \&quot;s/MemFree:[\\t ]\\+\\([0-9]\\+\\) kB/\\1/p\&quot; /proc/meminfo\` / 1024 ))\&quot;\\033[38;5;22m/\&quot;\$((\`sed -nu \&quot;s/MemTotal:[\\t ]\\+\\([0-9]\\+\\) kB/\\1/p\&quot; /proc/meminfo\`/ 1024 ))MB\&quot;\\t\\033[m\\033[38;5;55m\$(&lt; /proc/loadavg)\\033[m\&quot;;echo -en \&quot;$PVE\&quot;&quot;
        eval &quot;$AA_P&quot; &amp;&amp; export PROMPT_COMMAND=&#039;history -a;(($SECONDS % 10==0 ))&amp;&amp;eval &quot;$AA_P&quot;;echo -en &quot;$PVE&quot;;&#039; &amp;&amp; eval &quot;$AA_P&quot;;

        # sets up the prompt
        PS1=&#039;\[\e[m\n\e[1;30m\][$$:$PPID \j:\!\[\e[1;30m\]]\[\e[0;36m\] \T \d \[\e[1;30m\][\[\e[1;34m\]\u@\H\[\e[1;30m\]:\[\e[0;37m\]${SSH_TTY} \[\e[0;32m\]+${SHLVL}\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n($SHLVL:\!)\$ &#039;;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Check out this improvement:  it&#8217;s much faster because it only runs on certain seconds.  And it&#8217;s just being evald!  Very cool.</p>
<pre>
        # now this is where things gets really farout, figure out how this works and you'll learn alot
        export AA_P="export PVE=\"\\033[m\\033[38;5;2m\"\$(( \`sed -nu \"s/MemFree:[\\t ]\\+\\([0-9]\\+\\) kB/\\1/p\" /proc/meminfo\` / 1024 ))\"\\033[38;5;22m/\"\$((\`sed -nu \"s/MemTotal:[\\t ]\\+\\([0-9]\\+\\) kB/\\1/p\" /proc/meminfo\`/ 1024 ))MB\"\\t\\033[m\\033[38;5;55m\$(< /proc/loadavg)\\033[m\";echo -en \"$PVE\""
        eval "$AA_P" && export PROMPT_COMMAND='history -a;(($SECONDS % 10==0 ))&&eval "$AA_P";echo -en "$PVE";' && eval "$AA_P";

        # sets up the prompt
        PS1='\[\e[m\n\e[1;30m\][$$:$PPID \j:\!\[\e[1;30m\]]\[\e[0;36m\] \T \d \[\e[1;30m\][\[\e[1;34m\]\u@\H\[\e[1;30m\]:\[\e[0;37m\]${SSH_TTY} \[\e[0;32m\]+${SHLVL}\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n($SHLVL:\!)\$ ';
</pre>]]></content:encoded>
	</item>
	<item>
		<title>By: Mr Xhark</title>
		<link>http://www.askapache.com/linux-unix/bash-power-prompt.html#comment-139743</link>
		<dc:creator>Mr Xhark</dc:creator>
		<pubDate>Sun, 25 Apr 2010 23:48:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/?p=4069#comment-139743</guid>
		<description>&lt;p&gt;Nice tip ! Thank you&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Nice tip ! Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaysunn</title>
		<link>http://www.askapache.com/linux-unix/bash-power-prompt.html#comment-139284</link>
		<dc:creator>Jaysunn</dc:creator>
		<pubDate>Sat, 24 Apr 2010 17:09:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/?p=4069#comment-139284</guid>
		<description>&lt;p&gt;Hey This is Slick,&lt;/p&gt;
&lt;p&gt;Well done. &lt;/p&gt;
&lt;p&gt;Jaysunn&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey This is Slick,</p>
<p>Well done. </p>
<p>Jaysunn</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deesto</title>
		<link>http://www.askapache.com/linux-unix/bash-power-prompt.html#comment-128829</link>
		<dc:creator>deesto</dc:creator>
		<pubDate>Mon, 22 Mar 2010 19:14:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/?p=4069#comment-128829</guid>
		<description>&lt;p&gt;This is an insanely useful and thorough reference/tutorial/thingy on bash prompts, and as you say, for the impatient or those who don&#8217;t care, they can literally copy &amp; paste two lines into their terminal (or their bash profile) for an extremely informative prompt.  Thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This is an insanely useful and thorough reference/tutorial/thingy on bash prompts, and as you say, for the impatient or those who don&#8217;t care, they can literally copy &amp; paste two lines into their terminal (or their bash profile) for an extremely informative prompt.  Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
