.bashrc/PS1 command color different color to command output


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting .bashrc/PS1 command color different color to command output
# 1  
Old 01-09-2010
.bashrc/PS1 command color different color to command output

I have been configuring my .bashrc PS1 to be displayed with some nice colors and in a format that I like, however there is one thing that I cannot figure out (or know if it's even possible).

my PS1 line is as follows:

Code:
 export PS1='\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;32m\]\h\[\033[01;33m\]:\[\033[01;33m\]\w\n\[\033[01;31m\]\$ \[\033[00;32m\]'

This makes the command and command output dark green as follows:
Code:
root@sidian:~
# echo foo
foo

but I would like the command to be cyan and the command output to be dark green.
Code:
root@sidian:~
# echo foo
foo

I cannot figure out how to have the color change after a command is typed. Can anyone offer a solution?

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Change text color from echo command?

I have a bash script that starts and stops a game among other things through in.fifo and out.fifo In game the text comes out gray . Kinda hard to see in game window . I would like to change it to purple and maybe capitalize it. #!/bin/bash #nwservctl.sh cd... (5 Replies)
Discussion started by: 222222quick
5 Replies

2. UNIX for Dummies Questions & Answers

How to change the background color in the init 3 mode(not line color)

Hello, I am using RHEL 6.1 on VMware I am searching for a way to change background color (not line by line color wich one can using tput command) basically changing the color of the whole screen to white instead of the default black and changing font color to black and alos would like to... (2 Replies)
Discussion started by: Dexobox
2 Replies
Login or Register to Ask a Question