Re: more distinct default bash prompt?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux