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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16956 invoked from network); 23 Oct 2020 10:41:11 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Oct 2020 10:41:11 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1603449671; b=0gvCu0uncoVKTR43xnS1y1HX4sB58+EaobJt2Ydmix7wqofYcRQ1zOOMseTf7IQD6ChcoaeSBt ehenwZCmAKuFzP4m5FbNJb9Y1y1FvSX1eDQ1Dg+yIKLGCPsLQIaEoS+zQe2vJ09A/mfOezgtJZ 4DbijemwlmM9ng6KqMj4H66T/4IQ2Odhg4s4pJB04NNxxRLjTQKQYP9Uf2aN6g9ZQ8lLYrk2IV lxWy5gK0DBwg6Ts0f7H5E26dAOLwItEIrZtu3fjIvucp1TWZqQ1W0sL3GeNIUNIh5Pci7UAbRV rRHYqpdQh5fpYArfVeFnXluY/ehiWmUVAixDID/MoX90cw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f169.google.com) smtp.remote-ip=209.85.208.169; dkim=pass header.d=gmail.com header.s=20161025 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-20200801; t=1603449671; bh=ilWFqG3p3oHyzno+qcMbvbWLAtakdVFzxFG1AfWy518=; 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:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=K41OGjMcfPXkR+WEC+c6ayeGUZSKeZjZ4DoSmLJFIzktHTqwN/I0yWfYxoRn4mxzUaisOXmM45 /rF0P/Y+Uwt20dU3msCdNlqR2r8Ej3nRmjrnZfiUvNj8FoNvcSNrQjrYDi/DC4ZOifIHBaKU/u 504cK7htu8+Vnu4W0IOjAUmYVO8bjfwQnugc79NDbTJzqWgxBjOlQPll4+1LyL/8zQc2YSc1Kt t7XYMq3zyaCZ6rtukkMpLxCf5sN+rvcNj61s9Xei/1CeM2kXLhaF8yNFOaL0omwGtBSbVJ/TpK hbkciMyTjYFDcNW4zr5hiNEqkgF78lj7uxz+GlRndZPeKg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; 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:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ilWFqG3p3oHyzno+qcMbvbWLAtakdVFzxFG1AfWy518=; b=fq+xG9Q7QuOORRxVywO73VAm82 PYfhASVCmCbn+lfOSgdvm38RjaO5o6a//foK3HkGLEKhg/k5Fx8GXm8wK1KcwTVUNP97AvRf40U0K sCVbVGxt/zsNNFwHutDQpR801IBOnjSedoToTLW+pq40BDGJzAz66+TkW8PB3gob1FCEr/q0avfiV dsG9P+KKPVdaJzbbAnRTIY8QYSoUr1ANlt4Bo7+dRiYTQ9wx9VT7jmvxiPANmrPbRQ2E+IXebx+1b OHRNfvaC56o8U/teWKedqAKpDdD90g9oHbH+trIuqwub9egoMQfK0J7JOT4aGVzL/lk7X2Hb9kUbL 8BoJoO1w==; Received: from authenticated user by zero.zsh.org with local id 1kVuVN-000OrV-If; Fri, 23 Oct 2020 10:41:05 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f169.google.com) smtp.remote-ip=209.85.208.169; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lj1-f169.google.com ([209.85.208.169]:33971) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kVuV2-000OhC-SC; Fri, 23 Oct 2020 10:40:45 +0000 Received: by mail-lj1-f169.google.com with SMTP id y16so1052398ljk.1 for ; Fri, 23 Oct 2020 03:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ilWFqG3p3oHyzno+qcMbvbWLAtakdVFzxFG1AfWy518=; b=k4ueDTWeVPtY84Urz1+FHSYtjhm5DgCFu54BwAVdLpagpth48zKw0rIFjKdb5YwRhL mhfUAlvu0xPfk/Z9QbOHTG7WwGwWn1lYNoIErHIro3UGbpW/C0DHVZw7FSt2QEzt1MsB 8w+DXKe0pDwAm/Tp4x9GJHdB9rc34l5hhZUvmSx+/jedDx3Se5E1QnNpyv7j1wfxFwgu jMrRRdU6ZtA0gWoiEaG5KW1Mx/mBaOPW15Y/CuPC5EqKyIBEE5ykwvy5umIc0uvJXnrT 46llXXkREd5QPFj2Ha/JoVZi4RCP9dugDFVmMxAF0QPU0Q8PMOTcT91dKBk7MLQhovfs HE0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ilWFqG3p3oHyzno+qcMbvbWLAtakdVFzxFG1AfWy518=; b=SIV59d81BqkSXGW/SZCy+kFdGjyQob8R9mVRoIAVbPQaE7RrJpagn/K0CSpaeBA8xV LwhjeB7KuB/RIRdi3eaDPhFqVm7NPc9K9eWrmblc47zWFFvjoIhwTXumWoB+GoR7gVBb tSOusRKtZDbYhlmvdpaUehQfybc0ydaB2DqihfUSjzlt+/UdncdCwXKiAqa3vTRF/SWb Tda+ZSn8q5Tqd96w9ND8mPx/VhIZ5dnAS0BpSib0OhLqBbRb8VrtMx3JqlMVBUS7wlEa Mcr8Iw1PfoN+LR0qPNAlc+7OJhY2FjLGBHYYteANBpgZE9AISR5lo5cnO2nNf+GkX/ZV jhSg== X-Gm-Message-State: AOAM533uFa6uqwgi0z4WevQj0C1qHhHi9xUwLia4HKxTNQLQNQC8C7Nm bIC6c2ZGcOf5CODfBPKeHQl7Vd7R3dU1ZZSb8Ts= X-Google-Smtp-Source: ABdhPJyxRc/4Fph2U1CgNvx+WZBTIPew68/LI9Mq3VBEUu0LAWZuhqD4VR222Uyn4vqsOF7+SLwt/kMih/pmJW3+hgQ= X-Received: by 2002:a2e:9942:: with SMTP id r2mr570424ljj.409.1603449644110; Fri, 23 Oct 2020 03:40:44 -0700 (PDT) MIME-Version: 1.0 References: <20201014204621.4cf5b2b0@tarpaulin.shahaf.local2> In-Reply-To: From: Marlon Richert Date: Fri, 23 Oct 2020 13:40:32 +0300 Message-ID: Subject: Re: region_highlight converts `fg=default` to `none`, which is not the same To: Roman Perepelitsa Cc: Bart Schaefer , Daniel Shahaf , Zsh hackers list Content-Type: multipart/alternative; boundary="00000000000073d89b05b25436fa" X-Seq: 47484 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: Archived-At: --00000000000073d89b05b25436fa Content-Type: text/plain; charset="UTF-8" On Fri, 23 Oct 2020 at 12:35, Roman Perepelitsa wrote: > The only way to know whether the terminal supports some capability > (e.g., moving the cursor to the specified location on the screen, or > highlighting text with 256 colors) and to use the said capability is > through terminfo. There is no way around it. > Sure, but that is not necessary for this particular problem. If the user wants to pass something to their own terminal, then just let them. Zsh already lets the user pass in ECMA-48 SGR parameter values directly in both `complist` and prompt expansions. Why not in `region_highlight`? It would be different if there was no standard for this, but there is. I don't see any benefit here to adding two conversation layers (one being Zsh's own `region_highlight` syntax & terminology, the other being `ncurses`) in between. It unnecessarily limits the user's options. Anyway, what I'm trying to say is that it would be really nice to be able to use the exact same values for `ls`, `region_highlight`, `complist` and prompt expansions, instead of having to do ambiguous and/or incomplete conversions. That is all. --00000000000073d89b05b25436fa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, 23 Oct 2020 at 12:35, Roman Perep= elitsa <roman.perepelitsa= @gmail.com> wrote:
The only way to know whether the termi= nal supports some capability
(e.g., moving the cursor to the specified location on the screen, or
highlighting text with 256 colors) and to use the said capability is
through terminfo. There is no way around it.

Sure, but that is not necessary for this particular problem. If the u= ser wants to pass something to their own terminal, then just let them. Zsh = already lets the user pass in ECMA-48 SGR parameter values directly in both= `complist` and prompt expansions. Why not in `region_highlight`? It would = be different if there was no standard for this, but there is. I don't s= ee=C2=A0any benefit here to adding two conversation layers (one being Zsh&#= 39;s own `region_highlight` syntax & terminology, the other being `ncur= ses`) in between. It unnecessarily limits the user's options.

Anyway, what I'm trying to say is that it would be real= ly nice to be able to use the exact same values for `ls`, `region_highlight= `, `complist` and prompt expansions, instead of having to do ambiguous and/= or incomplete conversions. That is all.

--00000000000073d89b05b25436fa--