I want to include the return status in my prompt. (Easy add
'$? ', right?)
However, I only want the status returned (and trailing space) if non-zero.
sd ~ $ false 1 sd ~ $ true sd ~ $
Make sure that the
In zsh you could use its conditional construct in
The best I can have is obtained by
where I added a