xta / HalloweenBash

Custom Bash Profile Generator
http://xta.github.io/HalloweenBash/
333 stars 32 forks source link

Lacks exit status of previous command #6

Closed graywh closed 11 years ago

graywh commented 11 years ago

There's not an escape code for it like the others, but \$? works fine in a "-quoted string.

xta commented 11 years ago

Hey @graywh

I don't see \$? showing the previous command in my bash prompt. This link that uses echo !! (or a variant that leads with the ! syntax) seems to work better.

Thoughts on implementing?

graywh commented 11 years ago

That's previous command, not its exit status.

xta commented 11 years ago

Sorry for the misunderstanding. I've pushed exit_status in the latest commit. Thanks @graywh. The layout in box #1 is pretty unorganized, but functional

graywh commented 11 years ago

Is there a reason you used a function? You can use \$? just like \$(show_exit_status).

xta commented 11 years ago

Updated without function. Good call