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

Re: prompt colors bug? also possible feature add





On Tue, Aug 22, 2023 at 11:21 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
On Tue, Aug 22, 2023 at 5:37 PM Jim <linux.tech.guy@xxxxxxxxx> wrote:
>
> Not sure if I'm barking up the wrong tree ...

Not exactly ... previously I was pointing out that promises made by
the colors function have nothing to do with promises made by the
builtin prompt code.

> I guess the next questions is, does it only work with
> fade?

That's the only one that references it directly rather than by user
configuration, but it's the reason it appears in the colors arrays.


The more I look into "functions/Prompts" and especially *fade and fire there is no
change in color intensity or the use of "gray". It all has to do with the background
color and the use of 4 block characters.  "Full Block" is a "solid" color block.  The
other three blocks have dots as "fillers" with the background showing through the
open spaces, they are "light shade", "medium shade" and "dark shade". Because of
the background, this gives the illusion of four shades of a color.  Gray isn't even
used AFAIKT. This is easier to see with some colors over others. When grey is
specified, the color defaults to the default color of the virtual terminal you are using.

I also thought  that prompts just supported the first 16 colors, <0-7> normal
intensity, and <8-15> high intensity/bright.  But testing showed that colors are
whatever the virtual terminal/TERM can support. <16-231> are all the 6x6x6
colors and <232-255> are the 24 shades of gray/grey. 'adam2' and 'oliver'
support bold by using the word bold in the output string. At least 'adam2' and
'bigfade' allow a limited number of color changes from the command line.
One other thing, at least 'adam2' is set up to support '8bit' graphic characters
by specifying '8bit' on the command line.

If anyone is interested, bigfade is a good one to test with. Help(-h) shows the
following:

     prompt bigfade [<fade-bar> [<userhost> [<date> [<cwd>]]]]

To test instead of "prompt" use "prompt_preview_theme" .

example:
prompt_preview_theme bigfade grey red 75 148

Substitute the four args with whatever combinations of colors you want.

<black red green yellow blue magenta cyan white gray grey> or <0 .. 255 >

Hope this can be helpful to someone. I've learned a lot doing this.

Regards,

Jim

P.S. Bart, thanks for your input.

 


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