On 5/22/23 16:42, Richard W.M. Jones wrote:
FWIW Haiku uses bash and has a prompt which changes colour (green/red)
depending on whether the status code of the last command was good or
bad.  I found this surprisingly useful.  They use:

\[`if [ $? = 0 ]; then echo "\e[32m"; else echo "\e[31m"; fi`\]\w[\e[0m\]>

(or, as another example, just a fat red $? if it's != 0,

PS1='\[\e[0;1;31m\]${?#0}\[\e[30m\]\w \[\e[0m\]'

which I've gotten really dependent on over the years)
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to