Take the 2-minute tour ×  Note that I only want user's input to
have specific color (words that user has typed with keyboard),
not the actual command's output.  I tried:  export PS1="$
\033[38;5;154m"  I know that it should be closed with \033[m but
I have no clue how to insert it after the input was sent to
stdin.  export PS1="$ \033[38;5;154m$PS1\033[m"  This doesn't
work either.  The reason why I want this is to be able to easily
distinguish the input command from it's output. Thanks in
advance.  share|improve this question  2 Answers 2  up vote 0
down vote accepted  Bash won't be able to color all user input.
UNIX is full-duplex and all data displayed comes from the unix
machine, not from the local terminal emulator/keyboard so the
terminal emulator (xterm?) can't really tell the difference, and
bash only controls what it does, not what every program does.  I
use a different colored prompt.  if [[ "$EUID" -eq 0 ]]; then
PC="$COLORred"; fi PS1="\[$PC\]#===> \@ %\j / \u @ \h :
\w/\n#===> \\\$ \[$COLORreset\