Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to color the prompt and command of my shell differently from the text printed in the output stream.

My current export for PS1 is as follows:

export PS1="\e[0;36m\h:\e[m \e[1;33m\w\e[m\[\033[32m\]\$(parse_git_branch)\[\033[00m\]\n\e[0;37m➜\e[m "

I'm coloring the first line of the multi-line prompt correctly, but in the second line I'd like to color both the prompt arrow ➜ and the command itself white, while preserving the output as gray.

For example, see the following screenshot of my shell. I'm attempting to color the command ls white in addition to the prompt arrow ➜, but nothing else. I haven't been able to figure out how to color the command without changing the text color setting for the entire Terminal theme.

Screenshot of shell output

share|improve this question
    
You might get some hints from superuser.com/q/610058/195224 –  mpy Jun 29 '13 at 10:22
    
See also: superuser.com/questions/726181/… - this person also wants to change their input line color, not just the PS1 (but not their output). –  Caleb Xu Apr 11 at 3:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.