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've customized the prompt in my Mac terminal like this:

export PS1="\[\e[31,1m\] \w $ \[\e[0m\] "

This way I get the /working/directory $ in bold red, but I also want to get the command I execute in bold red. Nonetheless, I want the output of the command to be of defult color.

Basically I want this:

/my/working/dir $ echo "hello"     <--- all this in bold red
hello                              <--- this in default black

Any help, please?


EDIT: I tried the code on this answer but at least for me it is not working. It makes the command bold, but also the command output. And in fact I'm getting an extra ${OFF} tag printed after the command output and even a crazy behaviour when I press up key to see previous executed commands...

share|improve this question
    
Alright, I'm reopening the question and cleaning this comment thread up. Please add a reference to the question I linked to the question and state that it doesn't work (and explain in detail what does happen when you try it). Thanks! –  Daniel Beck Mar 8 at 23:08

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.