What do people think overall? Are there other pros and cons of a color prompt?
Any better ideas or direction?

I like the idea of using tput to get the correct strings for
setting different terminal effects, so I now use:

  # Success prompt:
  prompt_term[0]=$(tput bold)

  # Fail prompt:
  prompt_term[1]=$(tput setaf 1)  # red

  # Turn off all attributes
  prompt_term[2]=$(tput sgr0)

  # Make the prompt reflect the exit status of the last command
  export PS1='\[${prompt_term[$(($??1:0))]}\]'"\w"'\[${prompt_term[2]}\]'" ==> "

Cheers
  Nick
_______________________________________________
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