'How do I set the color of my host name in my bash prompt on macOS Monterey?
I have the following line in my .bash_profile file to set up my custom bash prompt;
export PS1='\e[0;32m \[`[ $? = 0 ] && X=2 || X=1; tput setaf $X`\]\h\[`tput sgr0`\]:\w\$ \e[m'
but the color of the host name is a slightly darker green color compared to the rest of the prompt as shown. How can I set the whole bash prompt to be the same color of light green?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

