Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I've played with color codes to jazz up my prompt, but is there a way to change the color of what I type after said prompt to make my commands a little more distinctive in the scrollback?

I can leave an open color code tag which sort-of works (not really); it bleeds up to the first colored bit in the output (which may or may not exist).

share|improve this question

marked as duplicate by Radu Rădeanu, Jorge Castro, Thomas W., Eliah Kagan, Eric Carvalho Jul 7 '13 at 0:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I'm not sure it can be done more cleanly than you did.
After unsuccessfully playing with the bashrc file, I found that other users achieved this using a DEBUG trap.
It's hacky, but it works on my setup.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.