From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id CA85B254B9 for ; Mon, 4 Mar 2024 23:29:41 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1709591381; b=FvJHOF4exailKjWnmfNTfg35hCsL1jK4CCLdgykRmeZJi/aWnoxCf6HIqhKGBuhBgw1f6QKojg 6N8seis4nlL/EZsJda/3v2wPKqbEPRNsUoGtTw+AVmSMh1wDLM33YD2YAOoO+fplRMutfn8Xqw Xs+y1PIJgZV6oC11XWbomHoVboxRTdSO2GaT5LMJSkNMkl0CVz+xwMAuJEUwJ053Hn5BdnkyZQ JILIKZpQwzoUeRgcw7Nwlt5BsrSmzP5nPxuDQucxqNPvVCNqP0bsKWmJ+JCV5Q7F7j15K+7I1i P6Ob+oH0DjkVQAVkhdW944UTW9K1Hi4BNSb15wZaq/9bCA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-wm1-f53.google.com) smtp.remote-ip=209.85.128.53; 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=1709591381; bh=/g/l22RJ6fequxaJUTM9SLDSCY5tml9mei4i1/M+bzQ=; 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=VG3cO/32AdVX+DAeA2zdaAZ6RcC3Hc8GNbqdfP+lBSxmwfRC1H8GAbjSDgp8d184S3I+dVP4ab E7JaEKi221kXGItxJoTxY3PQalUvSB7kpLd4gJV/jb2YCvO3qId/BXM+GfdonfT79Zd74o/ea4 43BK3A3AKXKperO1dBd1esCR6og9XXuNKJfX2EdbVmBiXcHTLVfKj35bZVQzCxrUprXljBsQMi FSs0hVk6Y5b5nok3qGB+W1pC8aXqZrtXIa2UaEmJUc/IaF5u2BTJi+K2LtggSKHHxSAMItrSfA pGMAIz/AYGvKs6MYMylJ4AYuqIWTECyeDazTSXE7d+2f2w==; 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=0BUabaCDHAKL070OTDe9lx4iPylfaKEbRxhGrE4v89s=; b=EL871ypVSuDh6qsFin+OwlPQIi 8OtdaprMSsWr413VZdzB+dtIc6JU3ffkO/JWY+HX3WbSk0KpnExNRTUeDBewGjImcT7rnte3rFraw P3TT22FIX+1kN3IIT6MDCa/4W8QF0NvFRb9qhjzhSTdx4Y9DRZGIEGlbqyIFRkyHrcOjSNeZGkoez P2TDIRc0Nu1DY7MkJpVgzW4VFeb9eEsrF7kKOuFp5FSGNd1Nokll28St3H2YHATDvfYUAHtTAkJjd kKK3QoDLfwh+IIUjczXNjLnSGtO6lNe2lNrIbTgnZ4ixDazL9oD92AJnYQEBcG9sqvbQK5YaWWmsn aboGTrzg==; Received: by zero.zsh.org with local id 1rhGoV-000N0W-ER; Mon, 04 Mar 2024 22:29:39 +0000 Authentication-Results: zsh.org; iprev=pass (mail-wm1-f53.google.com) smtp.remote-ip=209.85.128.53; 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-wm1-f53.google.com ([209.85.128.53]:47336) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rhGnu-000MgJ-Uj; Mon, 04 Mar 2024 22:29:06 +0000 Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-412ecc1064cso149795e9.2 for ; Mon, 04 Mar 2024 14:29:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1709591342; x=1710196142; 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=0BUabaCDHAKL070OTDe9lx4iPylfaKEbRxhGrE4v89s=; b=aE8HbT5HN/fjUf8lU9lMfSjeVG2P6LVuAVJDeutTEomlH7RNOM/aDSz4dfJPceunqx 5lybJlrBrBA2BLzy+RPtI2ujntTewu+TL1ThiY0heRMqQQzOH4Uj9EQiK7411kxCH9is 37Ea6Rh8OVDuGi4dnDuTTX8my1AfNVUZWIovNWFHcs/ql7Yf1Qu80bEQ2S/bQknM2FxJ vpvU0/JC3zhSjxlNyLyennEQNmhTrUBlTv7szJ9Vxcpet/0KJ1Nz+oNdGqAaTR857w+Z OKeOLoCPRoJrx+k4TALr8mzmQbMZu1q58ZJyYxEo/Ud9a6T7lqjwfgkrKnhNZ6e7GF4X RqeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709591342; x=1710196142; 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=0BUabaCDHAKL070OTDe9lx4iPylfaKEbRxhGrE4v89s=; b=qxXmNDo5iIzJdVKF5up1Vh86v1DVq0coYrzRptExmYx8nIENEsOuaZcClqu4KEJi0l lkgfnVY2eFpKArEvxChZPKg2vANf61BWmL051a5msz/LMGioiRfRYbdJ2pAjkZd2lO8U phH4HxmIqqhk9AysD3mkW6t5c1A01wcx8TT7y6P/KlSRDGSt6h2tWD7+kHo3m7n5ZztA Vd1xO7O3lwnwtPuuZ6zaVC3E/mcbC6k1v3VNl78Iw9u+3Ugk9Jy0W0Q3qdZu7Lpg/ODb rMrZtMcTpBAWO2s3gzlVdKdAT6n792NrSqvC1XCvcdouw3PeWExBOh8XvcXpfTN1qUq9 SvQA== X-Gm-Message-State: AOJu0Yxek7RfHliSX9vxV51d4iBJXTXIKM98WL/k2XB0DAz0zWayiYJc 07yq4rkPnfgnN8NuWSfLWoS7VyoC2XgtilViinmjpbn82QTaUkm4LepgN/gQuKCdPt6genVsyiD wYqSiv208vAn2jxBZaKOa3fnzz2H3cnRWcOEW X-Google-Smtp-Source: AGHT+IHXTpbrHkTqfMFMDhSmhQWe7BuD/ESOcguIpYC21CQyYZT3VsQg93ldjB9bDtnyIPBs76yz89Keoc2gJKxisKE= X-Received: by 2002:adf:f991:0:b0:33e:2396:20c with SMTP id f17-20020adff991000000b0033e2396020cmr5568275wrr.20.1709591342184; Mon, 04 Mar 2024 14:29:02 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Mon, 4 Mar 2024 14:28:50 -0800 Message-ID: Subject: Re: What appears to be inconsistent results from ${(%):-%F{${subscript}} To: linuxtechguy@gmail.com Cc: devs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52670 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: In addition to what Mikael already said ... On Mon, Mar 4, 2024 at 6:56=E2=80=AFAM Jim wrote= : > > First, '${(%):-%F{${subscript}}' has unbalanced curly brackets({}), but s= till works. Because of the "}" effect Mikael described, the prompt expansion here will be for e.g. "%F{grey" with end-of string instead of closing brace. That happens to work. > colorconversion=3D"${(%):-%F{${subscript}}" You need another set of quotes here, e.g., colorconversion=3D"${(%):-"%F{${subscript}}"}" Double-quotes can be nested when they are inside a nested parameter expansi= on. > 1) the color names grey and gray do not output black but output the defa= ult For the Nth time, prompt expansion does not correspond to the names instantiated by the "colors" function. The "colors" names are for generating direct output to the terminal, not for populating prompt strings. > using decimal numbers(0-255) > 0 - 15 uses 30-27 and 90-97(bright) instead of using the colors defi= ned > by the terminal > Hex codes appear to work as expected. [...] by a sequence in braces following the %F, for example %F{red}. In the latter case the values allowed are as described for the fg zle_highlight attribute; *note Character Highlighting::. Numbers 0-7 are interpreted as the names "black","red",...,"white" Numbers 8-(terminfo maxcolor) are interpreted as the color defined by termi= nfo Numbers greater than that are the colors defined by the terminal itself So the only reliable thing for true-color terminals is to use the hex codes. This is not really clearly explained under "Character Highlighting".