You are not logged in.

#1 2012-01-25 08:57:13

shaunsingh14
Member
Registered: 2012-01-07
Posts: 97

[SOLVED] Bash color didn't come out right. Did I do something wrong?

So, I was doing one of the general recommendations, and decided to do a colorized Bash prompt (just like I had in Linux Mint 12, Fedora, and Debian GNU/Linux). Of course, I think I might have done it wrong, because well, the text is a dull green, instead of being the same color as the cursor.

Here's an example of what I'm talking about:

example.png?t=1327481427

Here's the contents of my ~/.bashrc file:

#AndroidDev PATH
export PATH=${PATH}:/opt/android-sdk/tools
export PATH=${PATH}:/opt/android-sdk/platform-tools

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
#PS1='[\u@\h \W]\$ '
eval $(dircolors -b)

alias grep='grep --color=auto'

export LESS="-r"

PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[m\]\[\e[0;32m\]'

I've been wracking my brain trying to figure out which portion of the PS1 I should've modified to get the color even again. Does anyone here have a clue as to what I need to change so I can get the text back to bright green-on-black? lol

Last edited by shaunsingh14 (2012-01-25 09:24:20)


I made this account 10 years ago when I was an ignorant and insufferable teenager.
I apologise to all the people I annoyed with my cringe in the past.

Offline

#2 2012-01-25 09:18:07

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] Bash color didn't come out right. Did I do something wrong?

Try changing 0;32m to 1;32m. The last part of your PS1.

Offline

#3 2012-01-25 09:19:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Bash color didn't come out right. Did I do something wrong?

Please resize your image to conform to the Forum Etiquette: https://wiki.archlinux.org/index.php/Fo … s_and_Code

...and you might want to look at this page again, https://wiki.archlinux.org/index.php/Color_Bash_Prompt particularly the sequences closing off the colour declarations.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2012-01-25 09:24:05

shaunsingh14
Member
Registered: 2012-01-07
Posts: 97

Re: [SOLVED] Bash color didn't come out right. Did I do something wrong?

lol i tried to resize the image before i posted so it would conform to standard etiqutte, but apparently photobucket messed up on me.

thanks for the fix. it works, to some extent anyway. it's a little pale, but beggars can't be choosers.


I made this account 10 years ago when I was an ignorant and insufferable teenager.
I apologise to all the people I annoyed with my cringe in the past.

Offline

#5 2012-01-25 11:53:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,535
Website

Re: [SOLVED] Bash color didn't come out right. Did I do something wrong?

You can also change your terminal settings for what colors the bash color codes correspond to.

In xterm/urxvt this would be done in .Xdefaults or .Xresources.  I'm not sure which terminal program that is, but there should be a preferences customization somewhere to do this.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2012-01-25 13:25:11

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] Bash color didn't come out right. Did I do something wrong?

Trilby wrote:

You can also change your terminal settings for what colors the bash color codes correspond to.

In xterm/urxvt this would be done in .Xdefaults or .Xresources.  I'm not sure which terminal program that is, but there should be a preferences customization somewhere to do this.

That looks like gnome-terminal and gnome3. And yes, its colours can be easily customized.

Offline

Board footer

Powered by FluxBB