Good afternoon,
Recently, I've gotten into customizing bash prompts, specifically the color. I was wondering if anyone knows a way to set the color of a command itself.
For example, I made the prompt look like this:
using this string: PS1="\n[\e[38;5;214m\u\e[0m@\e[1;37m\h\e[0m \W]\\$ "
but I want the entered command to be light purple, so I added "\e[1;35m" to the end of my PS1 variable: PS1="\n[\e[38;5;214m\u\e[0m@\e[1;37m\h\e[0m \W]\\$ \e[1;35m"
The new PS1 setting makes everything after the prompt purple, including the output of my command, until the shell prints text with another color. For example:
The color of "ll" is correct, but I do not want my output to be purple, I would prefer the output colors remain untouched. Is there a way to set the command's color without interfering with the output?
Versions:
OS: CentOS 8.2.2004 (Core)
Bash: 4.4.19
rootfiles: 8.1