8 Jan
2013
8 Jan
'13
10:52 p.m.
On Tue, Jan 8, 2013 at 5:33 PM, Bob Ippolito <bob@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 allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net