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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15644 invoked from network); 20 Sep 2023 01:57:07 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 Sep 2023 01:57:07 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1695175027; b=ijQ617sG8jULyuDxa4Hm1jL6bOHOL5WDb6htYGdQhKngm1dSKEWbvJob9bREBSTOx9M5mx9rSv wBbAZDU8CfeaLs7QKEFpl8ISn9gWoox223P86qKtbt3v9skTfh9it/NW+U1KfZWej0FXLQDBSo 0epZajVaP7ipdDCQRSvHxVsGiks6uT5xci6gIqI4kxt26n+Zamtn56tDYoO436+mmczMlF/ZVj 7YdBxQKHtzyyGAFXM+dyfMxDAm4fbsulqm3dX+eWFFoRMh+5BJRM44RlRnhEYMy1jTTzzpeRCW VIgWbD0WwKNucZk06blsB38DGkRu2DKNrFDEYeBdtu4rVg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f51.google.com) smtp.remote-ip=209.85.208.51; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1695175027; bh=Pu6tIDsdnUxAFSq10OETGDSQ6YHDQhvBoD1bt8QqSp0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=NhjgDwao8urTyGsOSlRnTs6XO7Cxr2XD7fIFSLzaZUYGISk8DhbXXKmrIoFEJEw5XjTf3B55JM nWvnXvo8j3E6uLN7tGXEYEeiZRUq3ntt/EvjKASp69w2KMThSlf6ZauIMfpsr5mrDPBYoUy7IZ ih9WAkjUfUSNJRtUPSCYmDzZFe+01Ny1bkFFprCH2wqdY8looOGgWSKKuGjltP0M0e8nSQeW5A BL4/ckBtpnHswjKShqdEl9P3K50qpwdM3DoeiREvCy0MH+J/3ztMdDdOv2fRNU7D83EsCDub8r GZ1q/c9+MdimueDlGK1sv/6aa8xXVCZYEAN2PYkvfFxMVA==; 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-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ye0oU1+GnZR+vsCXgh7Md/QcIw8yoibcuwwFZ+KVWT8=; b=Q0kH6Dp59ehos05VFAlHU3Qs/w baRK0XcGs9vklhrvfEtFPL9qlB5cbmAGV41GKn4gf5Gi1uWzphj4pHPUFM3eXVM/+3/qp+ywCTRUv oJUQaw252jYngkBAAHAhkE6yOnOHhXCYIDryP+2x4jcrsc9KFc0EpnfIDjgWMDXpUgPV1ecnwPToC nlMsoUbvRMYljzqEFfjT0lJfvPdtGjti35eOnke9E2XjkMxIO4AbTrQFWtoSlR0/uN05p9o3t/ZdT U4MNduivwefdBBqh5Wb+Tk9hVF3cg7p+slW4mflcD5g43omKDPdVb6jPljWqiOVd851aBrdmaGpkJ IIwQLKig==; Received: by zero.zsh.org with local id 1qimSg-000C72-PQ; Wed, 20 Sep 2023 01:57:06 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f51.google.com) smtp.remote-ip=209.85.208.51; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f51.google.com ([209.85.208.51]:49497) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qimS5-000Bnn-Go; Wed, 20 Sep 2023 01:56:31 +0000 Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-52a250aa012so7744061a12.3 for ; Tue, 19 Sep 2023 18:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1695174989; x=1695779789; darn=zsh.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ye0oU1+GnZR+vsCXgh7Md/QcIw8yoibcuwwFZ+KVWT8=; b=OioUTpUomavllRfv+FzNZxvaKxZLVgGDrIzxlvpYfkYgK80mnYlAJh045lxPqRTACf 8ouq5eDukzMdFNZzuS3riQyWSh7jBmMdBZhEBCNnJ8mjPMBgSxuGDW5dGGV4ZZzpwEa+ KaMRF7LNohvUGM6y1I/hJDWWoEo5hj1DZDHrk1R3ymytrkQZ3jJTl4GP+MlqCtN2G377 VHCMQ81F5gD8xbgKMQDtbA7b2vrGCrWSHJ9gdXP6G4MlNNUSuGo+fr9xou5Y6gkGkME0 rwH81XUflHure1SyIZqoJ2JGArS8AI10biIuj7QJLLv5+WNTr6COkTnLl7bKcTCBzhIa pzjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695174989; x=1695779789; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ye0oU1+GnZR+vsCXgh7Md/QcIw8yoibcuwwFZ+KVWT8=; b=rpR4NNRaiZYe70fCcL+JxwwNWb5pS2RSj1N+Tvb78uVJ9048w3tXy5yykuZoNrUBJN tRHU7VzpdyTGL/1wQtZDnzXx1pDzRGSI/dClA6cir2tKy+vjliOm9J4kDE3tc4tLBEBn VGyZGczUg2v7nqVEFXd3ldEbnRsoHhU37Zy79ky9fMUdJ5uyUfAAl6viEWXTYRsrym/4 lebKFM6SeW/jNLvEE8fAmECDM7Ngp9fMmTp7rdixsrxL0HG8mUckv6g3FRVRLtLU+lBm /xh7LxmCzhR37wgN0RPmKNFtNYquZwpQzuVXoB3xjqEDEVanxM84OHUWcM8a0rIHlGYT oj+A== X-Gm-Message-State: AOJu0Yxn3jCDKIR96f5TLkw7SXZXDBW+2oQ8JiZO8enYjRbazUvf2QHP wlNPw5GUKMfQ1kKzYWM4Y9xKM8bNlKUMGrb8CMbl1A== X-Google-Smtp-Source: AGHT+IGnbOdhVgbu4SrLqd7+SrnU/Ze6ILttEjAkErSXvPuy8+uR4mxl0zL/i87sDRepYg8SS44dwQ17Ly1kj5avtjQ= X-Received: by 2002:a17:906:158:b0:9a6:1560:42e8 with SMTP id 24-20020a170906015800b009a6156042e8mr865014ejh.55.1695174988300; Tue, 19 Sep 2023 18:56:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Tue, 19 Sep 2023 18:56:17 -0700 Message-ID: Subject: Re: prompt colors bug? also possible feature add To: linuxtechguy@gmail.com Cc: devs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52162 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: On Tue, Sep 19, 2023 at 6:15=E2=80=AFPM Jim wrot= e: > > 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 w= rote: >> > >> > 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 whi= te >> >> "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 term= inal 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 enoug= h C to allow > me to be a Unix/Linux system administrator and install patches and to occ= asionally 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? You keep changing the context of the discussion. Everything you excerpted from my previous message is about prompt themes and the colors function. I keep repeating that this has nothing to do with the C code / the built-in prompt coloring. The colors function defines fg[grey] fg[gray] bg[grey] bg[grey] etc. > But what is more interesting, it appears that prompt doesn't depend on > the "colors" function. We're confusing things again. No, the built-in prompts do not depend on the colors function. Also no, the prompt themes typically do not require the colors function. In fact the only one that pretends to is mine (prompt bart) and only because it presumes the fg array might already exist. However, many of the themes accept parameters, and you can use the arrays created by the colors function to get those values. > 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 ... Exactly, which is why you can use $color[grey] or $color[bg-bright-red] to get a number. But that number is the same for grey and gray as $color[black].