Issue
When I have some operations on Mac Terminal, the user's input and the shell's output have the same color
When I have a lot of operations and I want to look back in the history, it is difficult because all the lines of the user's input and shell's output mix together.
I want to specify a different color for the user's input text. How can I do this in macOS Terminal?
System version: macOS High Sierra 10.13.1
Software: Terminal
Solution
In ~/.bash_profile
add this line:
export PS1='\[\e[1;31m\]\h\[\e[0m\]:\[\e[1;34m\]\w\[\e[0m\]\$ '
It will set colors of the prompt. You can read some more about this here.
You can also change some colors in Terminal -> Preferences... -> Profiles -> Text
.
Answered By - scope Answer Checked By - David Marino (WPSolving Volunteer)