<div dir="ltr">On Tue, Jan 8, 2013 at 5:33 PM, Bob Ippolito <span dir="ltr">&lt;<a href="mailto:bob@redivi.com" target="_blank">bob@redivi.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>- Having a PS1 prompt that contained the exit code from the last command was really clever, I hadn&#39;t seen that before. I&#39;m sure some people would be interested in what the bashrc for that prompt looks like.</div>
<span class="HOEnZb"><font color="#888888">
<div></div></font></span></blockquote></div><br>Just make sure promptvars is turned on (shopt -s promptvars) and then you can use $? in $PS1.  (Remember to singlequote the value of $PS1 so that $? is stored in it and not the current value of $?.)<br clear="all">
<div><br></div>-- <br><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div>
<div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</div>