Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bold prompt problem



In the last episode (Jul 14), arnuld said:
> i have setup a coloured & bold prompt:
> 
> PS1="%B{%{$fg[green]%}%n@%m %{$fg[red]%}%1~ %{$reset_color%}% }%#%b"
> 
> this gives me a prompt:   {arnuld@arch ~ }
> 
> where the whole prompt is bold except the last "}", why that closing
> "}" is not getting bold ?

$reset_color is misnamed; it expands to $color[none], where none is 0. 
0 means "reset all attributes", so you lose your bold attribute. 
$fg[default]$bg[default] resets just the colors.

-- 
	Dan Nelson
	dnelson@xxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author