Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bold prompt problem
- X-seq: zsh-users 11635
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: arnuld <geek.arnuld@xxxxxxxxx>
- Subject: Re: bold prompt problem
- Date: Sat, 14 Jul 2007 01:26:55 -0500
- Cc: ZSH Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <ecc395cb0707132304v4ea125f0hc885454d1f0fd5cd@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <ecc395cb0707132304v4ea125f0hc885454d1f0fd5cd@xxxxxxxxxxxxxx>
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