What I tend to do is have all text as red to indicate that I&#39;m on a production box, but Hamish&#39;s prompt is nice and not as offensive as a screen full of red.<br><br>Alfie<br><br><div class="gmail_quote">On Thu, May 13, 2010 at 2:37 PM, Sam Watkins <span dir="ltr">&lt;<a href="mailto:sam@nipl.net">sam@nipl.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Thu, May 13, 2010 at 01:44:33PM +1000, Hamish Carpenter wrote:<br>
&gt; As briefly discussed last night, I mentioned I&#39;d changed my prompt to<br>
&gt; be red on error (return code != 0). This helps me detect failed<br>
&gt; commands and also helps in another case where you type a command then<br>
&gt; cancel it by pressing ctrl+c. This was what prompted me to change my<br>
&gt; prompt as someone watching your terminal cannot easily tell that<br>
&gt; command was canceled, especially if it is a command that would have no<br>
&gt; output on success (eg rf -f project_directory).<br>
&gt;<br>
&gt; add the following to your .bash_profile:<br>
&gt;<br>
&gt; # needs PS1 to be previously defined so add nearer the end of your<br>
&gt; .bashrc/.bash_profile<br>
&gt; # will turn entire prompt red (31) or green (32)<br>
&gt; # depending on previous output return code<br>
&gt; export PS1=&quot;\[\e[\`if [ \$? = 0 ]; then echo &#39;0;32m&#39;; else echo<br>
&gt; &#39;0;31m&#39;; fi\`\]$PS1\[\e[0m\]&quot;<br>
<br>
</div>cool, a friend showed me something similar, giving<br>
^_^ for a success prompt, and O_o for failure :)<br>
<br>
        # SmiliePrompt - from <a href="http://x-demon.org/" target="_blank">http://x-demon.org/</a><br>
        smiley() { if [ $? == 0 ]; then echo &#39;^_^&#39;; else echo &#39;0_o&#39;; fi; }<br>
        export PS1=&#39;$(smiley) &#39;<br>
<br>
It&#39;s important to know exit status, so I use this all the time.  The shell<br>
should really do something like this by default, maybe not the cute emoticon<br>
version though.<br>
<br>
enjoy!  :)<br>
<div><div></div><div class="h5">_______________________________________________<br>
Melbourne-pm mailing list<br>
<a href="mailto:Melbourne-pm@pm.org">Melbourne-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/melbourne-pm" target="_blank">http://mail.pm.org/mailman/listinfo/melbourne-pm</a><br>
</div></div></blockquote></div><br>