On Tue, Jan 8, 2013 at 5:33 PM, Bob Ippolito <[email protected]> wrote:

> - Having a PS1 prompt that contained the exit code from the last command
> was really clever, I hadn't seen that before. I'm sure some people would be
> interested in what the bashrc for that prompt looks like.
>

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 $?.)

-- 
brandon s allbery kf8nh                               sine nomine associates
[email protected]                                  [email protected]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
_______________________________________________
Haskell mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to