From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 7d3f5663 for ; Thu, 5 Dec 2019 11:20:36 +0000 (UTC) Received: (qmail 989 invoked by alias); 5 Dec 2019 11:20:31 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44985 Received: (qmail 26083 invoked by uid 1010); 5 Dec 2019 11:20:31 -0000 X-Qmail-Scanner-Diagnostics: from mail-il1-f176.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25653. spamassassin: 3.4.2. Clear:RC:0(209.85.166.176):SA:0(-2.0/5.0):. Processed in 0.722356 secs); 05 Dec 2019 11:20:31 -0000 X-Envelope-From: roman.perepelitsa@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.176 as permitted sender) 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:content-transfer-encoding; bh=ytWIl6vqXPNH/eQaHdavwRg7t2eFEnqAcOxDDf6XUDw=; b=lFQkxYuw0j+GAhS7q7M0siVDuGDdlJwJxEkcRFLWUGmEUndAbBUX4FW31Ou4b5NPTm ab081b8XkgO3HypAjn3g7zM9JODFTDZxfCea4OjSthkdZcRXP37c99rlMYiaoIWT96YA RIP/wBOPO0F6GGOq9pWaVitEXBdV3osesN12YdFWVsDvoYbU+RaOBebvQT33eJJTeO/J gKXf3rCdiBFS71gwiNe6XcdCs60ndTlhamMvXou1svrMB33OBE2fc5EXNz1z4If+ZytO nb8upHo3f7lQ/JrcyIF1JJn/Iwvuaa0/o1MjvuYVc1mkojzB8l+nQMoNGTa3cycY2rAJ j5aA== X-Gm-Message-State: APjAAAV+J01l/1vRUmcTbnTcBc4Cki0uABd+KmEYVC2lnWwAuJJEwixH MDZeZMgenc3R3gLe/B9WgaMGJBkdLDqiZa7yFoI= X-Google-Smtp-Source: APXvYqxY1utaDHYoMUlMoeUamVaZZevpZu06PX0vZIJjWN48IdEnoPyqwxvArwVjh7uv7EYYijsdKn02AAbVZpKeH5Q= X-Received: by 2002:a92:290a:: with SMTP id l10mr8181431ilg.151.1575544797033; Thu, 05 Dec 2019 03:19:57 -0800 (PST) MIME-Version: 1.0 References: <20191129122141.rekf7hcxtacjojo2@localhost> <20191129172303.sd5bj3gukhdb7mpp@localhost> <20191129203707.ipf4zjkkptg35lpa@localhost> In-Reply-To: From: Roman Perepelitsa Date: Thu, 5 Dec 2019 12:19:45 +0100 Message-ID: Subject: Re: Funky list-colors To: Sebastian Gniazdowski Cc: Bart Schaefer , zsugabubus , "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 5, 2019 at 12:08 PM Sebastian Gniazdowski wrote: > This seems a less powerful than the hacky printable-LS_COLORS idea, > which I overall like. From experience, such things often result in > unpredictable and highly surprising + valuable solutions. Maybe it's > worth opening this door? In a most optimistic scenario, the code would > have to do a few isprints=E2=80=A6 I don't think it's generally possible to figure out by how much the cursor will move when you write a given string to TTY. If it was possible, there would be no need for %{...%}. An alternative would be to add another flag that says that list-colors should be percent-expanded. Or add a new parameter that is just like list-colors but gets percent-expanded. Unlike with raw strings, computing the length of a string that undergoes percent-expansion is a solved prompt. Roman.