Topic: https://brettterpstra.com/2009/11/17/my-new-favorite-bash-prompt/

Comments

hide preview ▲show preview ▼

What's next? verify your email address for reply notifications!

unverified 6y, 73d ago

it is nice, but the check of [ $? -eq 0 ] will immediately set the $? to 0, destroying the real error code. therefore showing ->(0) on any non-zero error code.

hide preview ▲show preview ▼

What's next? verify your email address for reply notifications!

Tomer Lichtash 15y, 196d ago

Beautiful. Thank you.
Do you know how to add $BRANCH an indication as to the branch's status?

hide preview ▲show preview ▼

What's next? verify your email address for reply notifications!