On Tue, Jan 8, 2013 at 5:33 PM, Bob Ippolito <b...@redivi.com> 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
allber...@gmail.com                                  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to