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

Re: bold prompt problem



On 7/14/07, Dan Nelson <dnelson@xxxxxxxxxxxxxxx> wrote:

> 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.


thanks Dan, it works :)

BTW, how will one make system-wide changes to ZSH shell. by creating a
"/etc/zshrc" or "/etc/zsh/zshsrc" ?

--
http://arnuld.blogspot.com/



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