You are not logged in.

#1 2018-04-29 05:06:52

jordanjcp
Member
Registered: 2018-04-29
Posts: 2

export PS1= in .bashrc strange behavior?

export PS1="\[\e[1m\]\[\e[34m\]\u@\h\$ "

This one line is the entire content of my .bashrc right now.
It seems that no matter how I try this, I can't have anything in my prompt be both bold and colored.

If I set the color alone it works, but as soon as I add the bold the color changes to bold grey.

I started out using https://wiki.archlinux.org/index.php/Ba … tomization as my reference.
Then google and some bashrc generator tools.

I've tried every way I could find and am stumped.

Any suggestions or thoughts would be much appreciated.

Thank you.

Note:
I've also tried it as
export PS1="\[\e[1;34m\]\u@\h\$ "


ANSWER:
It seems that when I set bold it uses colors 9-15 instead 1-8 that I was expecting.

In the solarized theme 9-15 are various shades of grey.

I added "URxvt.intensityStyles: false" to my .Xresources and everything is working fine now.

https://superuser.com/questions/512138/ … -from-8-15

Thank you.

Last edited by jordanjcp (2018-04-29 17:27:20)

Offline

#2 2018-04-29 06:56:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,849

Re: export PS1= in .bashrc strange behavior?

Tried closing the section (the one w/ the semicolon should be correct)
export PS1="\[\e[1;34m\]\u@\h\$\e[0m "

Offline

#3 2018-04-29 15:21:36

jordanjcp
Member
Registered: 2018-04-29
Posts: 2

Re: export PS1= in .bashrc strange behavior?

Thanks for the suggestion.
I changed it to:
export PS1="\[\e[1;34m\]\u@\h\$\[\e[0m\] " 

But still no dice. If i change the 1 to 0 I get my blue. When I change it back to 1 I get my bold grey back.

Is there any other place I need to check to find if something else is effecting this?

If I change it to:
export PS1="\[\e[3;34m\]\u@\h\$\[\e[0m\] "
I get italic blue as expected, it only seems to be broken with bold.

EDIT:
It looks like it was the solarized theme colors in .Xresources was the problem.
I removed all color changes from the file and the prompt seems to be setting correctly.

But I'm curious, does the bold setting pull its own separate color value when its set?
Why wouldn't the blue color still be applied when set along with it?

I'd like to understand how that all comes together if someone can point me in the right direction.

Thanks.

Last edited by jordanjcp (2018-04-29 16:58:33)

Offline

#4 2018-04-29 20:35:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,849

Re: export PS1= in .bashrc strange behavior?

I'd assume the VTE uses the bright color for the bold variant?
Do you still have  the previously used color resources?

Offline

Board footer

Powered by FluxBB