3

this is my PROMPT

PROMPT='%{$fg[green]%}%n%{$reset_color%}@%{$fg[white]%}%m%{$reset_color%}:%{$fg[yellow]%}%~%{$reset_color%} $(git_super_status)
%{$fg[white]%}\$%{$reset_color%}'

Yes, the new line is intentional, it looks like this:

carlo@machine:~ 
$

My problem is that the white portion is not white, but it stays gray. I've tried this with xterm and urxvt.

XTERM variable is set to xterm-256color for xterm, and to rxvt-unicode-256color for urxvt.
If I use terminator, with TERM set to xterm, the white color is correctly visualized. I've also tried setting TERM=xterm also in the other terminals, but it did not help. Do anyone have an idea of what is happening here?

EDIT I've forgot to tell that using urxvt/xterm and bash, the white color is perfectly visualized. Also I've played a little with escape codes, I can set the variable to white italic, white blinking, white bold but now just plain white.

  • 1
    Whatever the problem is, you should rather set TERM variable, not XTERM. – jimmij Dec 19 '14 at 16:31
  • Sorry, a typo, edited the answer. – Carlo Dec 19 '14 at 16:32
  • 1
    How about setting white color explicitly: PS1=$'%{\e[37m%}XYZ> %{\e[0m%}'? – jimmij Dec 19 '14 at 17:02
  • OK, so try high intensity: PS1=$'%{\e[97m%}XYZ> %{\e[0m%}'. Also run echotc Co in problematic terminal and report the output. – jimmij Dec 20 '14 at 14:58
1

you may want the bold white color:

PS1='%F{green}%n%f@%B%F{white}%m%f%b:%F{yellow}%~ $(stuff)%B%F{white}\$%f%b '
  • Thanks, I've already tried that, and it works in fact, but that is not exactly what I want. If I do not find an alternative I will use that eventually. – Carlo Dec 20 '14 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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