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

Re: Colours leaking from RPROMPT



On 19 March 2014 22:34, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Mar 19, 10:50am, David Banks wrote:
> }
> }             RPROMPT="%F{cyan}${timer_show}s %{$reset_color%}"
>
> Are you sure $reset_color is defined?  You need to autoload and run
> the "colors" function to initialize $reset_color.

printf "%s" "$reset_color" | wc -c
=> 5

> However, you shouldn't need $reset_color at all ... you should use:
>
>     RPROMPT="%F{cyan}${timer_show}s %f"

That fixed it, thanks!

> You might also want to look at the zsh/datetime module and $EPOCHREALTIME
> instead of doing all that "date" and "bc" stuff.

Great, I will check these out.

Cheers!
Dave



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