From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14501 invoked from network); 20 Sep 2023 01:16:30 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 Sep 2023 01:16:30 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1695172591; b=arAExFTsJj7o/pG2btM67Lt1QYvaTQ/J6+PD6e9eFM8JUomcCENUjpJFeYOyJ3Xs7XsY0k0NpZ Tf6q9uCgsdFb/Ehk8q+X0rxo3ga0JrBZcd3P9Foyj/xP7UuzaXkKHY8ryIH7Mw67aF9s2JAqAG qfPW5VmNm5bIqAs3m7p5yUnZtO2aj4jx18syogMM3P7WBxSyYx4qZ3HJr8AmuZTkHSee08bvWs FZnqH/5s6Le1knv9Sw3iA2K5uZ+2TIJHyKK/1dDLRo7BDneQNwNwIflloo8vP5S3K+CbSE8+Om i7gT5Rf6p/erAXdeIGo6GZ/93KeB29kbLi65a8vfkqeqmA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f170.google.com) smtp.remote-ip=209.85.219.170; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1695172591; bh=jNTgUxaDm167fqakZNpiysMq7hASSAeqMT44M33sbUM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:Reply-To: In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=RbNkZSWMd50J8mWgUaLO9gsx/0qHRd6rsgTl3AZ8cK0GGAvb0raR93GgeR1MJxPnBabE6jfQ28 dkGx6x7PjfQuFBrbeEIsFJDuwbqJsLvkoPZcmADyVZ7UZM6Kkau8YKw0QW+v5Q2hCPa/I5CQw1 H7tp4k6VUOuKT9HeIzd7GPrAiV4ClFjjCrdecbgr6hbm5g/ZYxGAmi7RaA71N/k7PGatqul5uV h3/Mu7uUaLM97L2s7KdsxLFmu4bqe+0j+tiUr8mSSJqXTgHzlQZ8tPdvpY/i3fc/cUr06I5f3Y VtKktpLEjnk9y7p8AeAss45CdX4ErO18qcHqld1oG4t9vA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:Reply-To:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=dYti8LVZ7Vi0RPPH0OJGSE8Yfyt++dDvI+fy0IX8/EE=; b=ZWRmGLReU5ztZrp9Ki3B7itjzf vrjq+7R/22blHr+VSi73dW6xfjKCcd4oUnt5rYXTU21829iIRJtBeLEKk6NAPLinOy2xQZgbdmS7x 3r6Yy8fwVK9OK4weolLTBjN13Pz/1Qxw1xCSFydgtMogEmkQDoNkz17XmU6UwFo7FjFUmSC9Y3QSi jOwV+PO6tRHmTxrQrPTRzB0vwfANCSPD1ck369IJ1f38p/W+gTPoDK5ZS/UVRV1LNZZwFRpAaqgEF kGzmOe9Q70PwZMa7X2DmzAl68VARAx99bJJfLs64CEkZfa9gba7iVFGW2yt/G7IPmLxDcUHF1hhrV 5i5VdBOw==; Received: by zero.zsh.org with local id 1qilpM-000Ab2-4k; Wed, 20 Sep 2023 01:16:28 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f170.google.com) smtp.remote-ip=209.85.219.170; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-yb1-f170.google.com ([209.85.219.170]:58604) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qilol-000AHa-4U; Wed, 20 Sep 2023 01:15:53 +0000 Received: by mail-yb1-f170.google.com with SMTP id 3f1490d57ef6-d8162698f0dso6178098276.0 for ; Tue, 19 Sep 2023 18:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695172550; x=1695777350; darn=zsh.org; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dYti8LVZ7Vi0RPPH0OJGSE8Yfyt++dDvI+fy0IX8/EE=; b=MYkUbL+dNRs197qJaNjqnKZN33J6wK26T5bJP1aF55o5aBWZu10ETD4qZPEWKwPjXt wzKa1ZX9Fe591NpxqS0C0WXTbiwwilXdFIbBYWPwDBlPiJOcRyDKJzmNBunWMVn/IhlF JKS12u15jTyTcy6DDOPSjNNfPV1CFWTmi5KBQ7ytZGxKPHs1U9tuBZrgbxkCAeXF61TH BYpVKdMl+qgpCljMXCrqX7qDr391Pf58eNzrd8mGhyQrc3Btf9sTj10DvGmyZZbhBSfF fYEdg7zLvl7YxUe0ciMyXncBjHg9ERGToZqrzXsZnv0lN0OGd/RIT7QeX9aEJw4+aqIq iGcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695172550; x=1695777350; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dYti8LVZ7Vi0RPPH0OJGSE8Yfyt++dDvI+fy0IX8/EE=; b=OoOfv1EqC2y3ATdz2ctLsLVUXr7WUz0qxfPHqBujbUVSJ7OvZRuInXtSFzhSxUy6Bc lRnkGpNigMheuEox5d4p1LQi89g+fyEoxXtO6irzv71svLOckfiUoSI73EvGkss+rc2n rztswDvayXvDMAVny0huca1RVJ0LPDoV2pONk7ZV/7XRB0O8NaRCMhVfgKXqCNvG0gHt EHVVQnkDKtWuLuuBliakFUU0HwiBechYUZ3nF1Vj2VcHbOwrohm87ycatwwVJcS0m13U boFqaPS681IWbD2pomhLfsuDouGy6jiQRW2ZI6DOPLqJfiJHisiv+0PEkZrQVFE9qUe+ v2Zw== X-Gm-Message-State: AOJu0YxJNBWIPRDd+Xr1C3UwTZeNpVMBqO5GlGK28+y1jbjUIHQiuIkk Olizg0f0oHQwEQDxJUT/cHFSLx7SULOPLNxA3+GBYsMRCq8= X-Google-Smtp-Source: AGHT+IFdLo4QbKN4boFkN+3eD0c0oGbReS08Dw3oMs+/B7Kpaeb+H6Zit3bsDwkslIneaXlOD6ajYgGj1FqCmPNN+oQ= X-Received: by 2002:a25:cb0f:0:b0:d7b:8d0c:43ee with SMTP id b15-20020a25cb0f000000b00d7b8d0c43eemr1155028ybg.37.1695172549848; Tue, 19 Sep 2023 18:15:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Reply-To: linuxtechguy@gmail.com From: Jim Date: Tue, 19 Sep 2023 20:15:19 -0500 Message-ID: Subject: Re: prompt colors bug? also possible feature add To: Bart Schaefer Cc: devs Content-Type: multipart/alternative; boundary="000000000000aab4ea0605c01d68" X-Seq: 52161 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --000000000000aab4ea0605c01d68 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Aug 23, 2023 at 10:45=E2=80=AFPM Bart Schaefer wrote: > On Wed, Aug 23, 2023 at 5:42=E2=80=AFAM Jim wr= ote: > > > > The more I look into "functions/Prompts" and especially *fade and fire > there is no > > change in color intensity or the use of "gray". > > prompt_fade_setup: prompt_preview_theme fade white grey blue > prompt_bigfade_setup: prompt_preview_theme bigfade red white grey whit= e > > "colors" defines "grey" so as not to break those preview defaults, and > defines "gray" because some people spell differently. > > > When grey is > > specified, the color defaults to the default color of the virtual > terminal you are using. > > I think that's because the virtual terminal is overriding "black". > Both gray and grey are defined as being identical to black. Only the > xterm extended "bright" variants are actually gray. > First, I'm no C programmer so I could have missed something. I knew enough C to allow me to be a Unix/Linux system administrator and install patches and to occasionally gen my own patch, when needed. Looking through prompt.c I find the following: /* Defines standard ANSI colour names in index order */ static const char *ansi_colours[] =3D { "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", "default", NULL }; Grey/gray aren't defined as far as "I" can tell, anywhere. Should it? That is for someone who knows more about this than I do. But what is more interesting, it appears that prompt doesn't depend on the "colors" function. I commented out my prompt code in my .zshrc file. Opened a new terminal. % unset fg bg fg_bold # cleared all colors associative arrays % print -- ${fg[yellow]}This is a test # outputs the terminal's default color not yellow Initiated prompts: % autoload -Uz promptinit && promptinit % prompt adam2 Ran several tests using: % prompt_preview_theme fade Substituted different color names for Prompt outputs all colors as defined in prompt.c. Did not include gray/grey. What is also interesting, prompt can output all colors defined by "number" instead of a color name. e.g. 1 for red 9 for bright-red ... The linux console will output colors 0..15 All virtual terminals(that I tested) outputs all 256 colors: 0..255 Anyway, just passing on what I found. Regards, Jim --000000000000aab4ea0605c01d68 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Wed, Aug 23, 2023 at 10:45=E2=80=AFPM = Bart Schaefer <schaefer@brasslantern.com> wrote:
On Wed, Aug 23, 2023 at 5:42=E2=80=AFAM Ji= m <linux.t= ech.guy@gmail.com> wrote:
>
> The more I look into "functions/Prompts" and especially *fad= e and fire there is no
> change in color intensity or the use of "gray".

prompt_fade_setup:=C2=A0 =C2=A0 prompt_preview_theme fade white grey blue prompt_bigfade_setup:=C2=A0 =C2=A0 prompt_preview_theme bigfade red white g= rey white

"colors" defines "grey" so as not to break those previe= w defaults, and
defines "gray" because some people spell differently.

> When grey is
> specified, the color defaults to the default color of the virtual term= inal you are using.

I think that's because the virtual terminal is overriding "black&q= uot;.
Both gray and grey are defined as being identical to black.=C2=A0 Only the<= br> xterm extended "bright" variants are actually gray.

First, I'm no C programmer so I could have misse= d something. I knew enough C to allow
me to be a Unix/Linux syste= m administrator and install patches and to occasionally gen
my ow= n patch, when needed. Looking through prompt.c I find the following:
<= div>
/* Defines standard ANSI colour names in index order */<= br>static const char *ansi_colours[] =3D {
=C2=A0 =C2=A0 "black&quo= t;, "red", "green", "yellow", "blue"= ;, "magenta", "cyan", "white",
=C2=A0 =C2= =A0 "default", NULL
};

Grey/gray aren= 't defined as far as "I" can tell, anywhere. Should it?
=
That is for someone who knows more about this than I do.

But what = is more interesting, it appears that prompt doesn't depend on
the "colors" function.

I commented out my prompt= code in my .zshrc file.
Opened a new termi= nal.

%= unset fg bg fg_bold=C2=A0 # cleared all colors associative arrays
% print -- ${fg[yellow]}This is a test=C2=A0 # outp= uts the terminal's default color not yellow

Initiated prompts:
% autoload -Uz promptinit && promptinit
=
% prompt adam2
<= br>
Ran several tests using:

% prompt_preview= _theme fade <color1> <color2> <color3>

Substituted different co= lor names for <colorN>

Prompt outputs all colors as defined in prompt.c.
Did not include gray/grey.

What is also interes= ting, prompt can output all colors defined by "number"
instead of a color name. e.g. 1 for red 9 for bright-= red ...
The linux console will output c= olors 0..15
All virtual terminals(that I te= sted) outputs all 256 colors:=C2=A0 0..255
=
Anyway, just passing on what I found.<= /div>

Regard= s,

Jim=

<= br>

--000000000000aab4ea0605c01d68--