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 10984 invoked from network); 12 Oct 2020 09:23:25 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Oct 2020 09:23:25 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1602494605; b=TcK0q9hzuJ6hjWd0HTeDKf7zcv+0qg3qxWu6fUeLafrJwDx/tvc+GdnjS+2Mx3gDxsMVr/O9go Tw7osiNYTjFex9EpxoB3+D5KeUYi+yF29zQSiyXbkugAcW+nW2CWg9J2Q+9uPmYvj+wkHHb1CR 8sGOBtpea+Rl8SYBvNOARhyq4xh9Ct85DzyuLu9CN9nvHJ+u6hn3BGnTmyKRU41KvIc2F2bkmm 6kD6A2ITMbWq4FGQ4ezwZj+wYV75A3dyFCIVHWrxh/5RaMp2dtk3ovZpBh8bLPIjnyb+sZXypH 0EpUekFExXE2BUscl79jjxuAunu6Keqm37a+vVFlwmMsFQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f170.google.com) smtp.remote-ip=209.85.208.170; 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=1602494605; bh=aJR5eVM98zUvKPlQ+bIe5xL7rcBQf8ai1mHWzbu69V0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=dleRhYUJP71NeCnsPverMxFUKBK0z9AG9HfkN5zs6j8V3Hij/Io4/HYGFh63A4M8/ApDP62YmT NM+tA5W626yNOOOnmtqZaum3r6wO9AiwHEqhhiJ9QMxOYEBZp3s0zgJzlFJ09UnTsM4kxQ73KL uQ4uV0YXO7llkxRRZQcaK4KR969KDQRUsiSGdHpIWfkHguWDqoHmd0p9PyvggVNHpBr1p/l3++ SfJblKMzmvmIeqCI/+Eask8VCrnnaIGHJ1gaIHdFrHx8xazeUxfUS7dKqq9cdL2eZ5z4eSWq8y G4KS25eU+6Z7aOef2aqZp72Cyo3+3bsEyeh6UXlGTfAMcQ==; 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:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=d+nP8J8A85gjBvFSMMTpGNGq5qnJ/+0F5SmHjAnIVyg=; b=HsmwdJVOL2TFxitq4R81917xrJ wTSiAwyJvICvymWbqQlL82+cFuEfYFgOOdqzeeld70M2yinE3I1JJnvSpb9p7xS3COqBSUnVAMLBo J7nEM76NGJaClfl5unlmN4HkEIxUQb2KMd1UcBgbeTOHsc28QUN4QiB5BGkB4qAn2xwIwDaIzjNhV 6sdacTDLoVFEqkbBoDO3yEk1BiVHovAIVPBN/C9tzr42XwsV/Tqrlsfc+Lnhvevd6mCCpeyRkMEG7 8gHS5fMh2I5Ji7tUCjz/byEmyYL86ZcR62pDVMzxILvvEUtj4772HFG2t+5ValgU8l7lxVK/5esUL gI/paG1w==; Received: from authenticated user by zero.zsh.org with local id 1kRu33-00051z-8D; Mon, 12 Oct 2020 09:23:17 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f170.google.com) smtp.remote-ip=209.85.208.170; 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-f170.google.com ([209.85.208.170]:35487) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kRu2i-0004sp-K6; Mon, 12 Oct 2020 09:22:57 +0000 Received: by mail-lj1-f170.google.com with SMTP id x16so2887738ljh.2 for ; Mon, 12 Oct 2020 02:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=d+nP8J8A85gjBvFSMMTpGNGq5qnJ/+0F5SmHjAnIVyg=; b=nSuJxR5SYgOl30IltMTIoutS4bs8RiQ/9P52ayzGZOid8CxrFiyLIhvaWVXeASwdUf vcHqovYYoYeHQxU3fxVkjky1Ilan/nB/geBIgBexm/u05Fdg4qZAM48ivoK+Zb5CVfXO 9/cODeQ1rXViJ3U6+JA0+ZXvbdT91QdmZz+B4CZ+TvBD8usBzripjYqrJ+9d2kbQXUSS cUFbTjTlMwDhMea+OIfBwo1WuwfFUjebje3eidYNC0lRY5Cd5/uBkXVYf4op+eZxVvto N+IeJQzbqiI5hHckwKuhNkdh8j+AH5RbkgvWehXZjafoZ0zIzmf16W+x66+zE/Bmwo/e hDGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=d+nP8J8A85gjBvFSMMTpGNGq5qnJ/+0F5SmHjAnIVyg=; b=gRmVgWaDehgsyG3KCheZbd9QMxGPmjuGK1Y58N1w1rkZIQppGUGcDmfgxl7qudjGjT YljEs49V0yocV5uenG8loWZcLTnwweaZvC+W6cTtllKm/cL6AVf2CpLo+dyqk2KyjE8e 2n/NgpG0+PBVMvy6pLcJdZP8TlNLH7nhqsoL47dbJDdljWtLtVsIdrhmchtl6dQegFVM hYi2sxqRIGJrxfjaL91ElWJ2fegsmbRkY1BNaldxU8Vlz0bH/q9NqL/IN5nw/lOIgLw8 hariO6xSTzYSE6e+KSPJ5qc6YwiLHu7x5QMk9PMuPwEewLHJgwVCFmpXP+I6ovcgiDNi SQhQ== X-Gm-Message-State: AOAM533vGBguYjpaXcrUv1vHSzPvKbsDmaxzKNiPugLupd/vFZ9Z6jYW OwE0jqmcOQ9wP98W6AW7PVKuDo7Sjz+5MhgKA2tVoxsPsDk= X-Google-Smtp-Source: ABdhPJyrrd48OgupMCvncMeYF+hs8pFPV25kXujVjvfQ7MSnHelCDdeTlyQMPs3Y3VXx8hb1/prvikzY4UktaKsbcv8= X-Received: by 2002:a2e:9942:: with SMTP id r2mr9855710ljj.409.1602494575017; Mon, 12 Oct 2020 02:22:55 -0700 (PDT) MIME-Version: 1.0 From: Marlon Richert Date: Mon, 12 Oct 2020 12:22:43 +0300 Message-ID: Subject: region_highlight converts `fg=default` to `none`, which is not the same To: Zsh hackers list Content-Type: multipart/alternative; boundary="000000000000e6039105b175d76e" X-Seq: 47445 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: --000000000000e6039105b175d76e Content-Type: text/plain; charset="UTF-8" Hi there, devs! I am using `zsh-syntax-highlighting` and I want my paths to be blue, but the slashes in there to be my terminal's default text color. I've tested it and `zsh-syntax-highlighting` correctly puts, for example, ``` region_highlight=( '0 2 fg=10' '3 16 fg=4' '3 4 fg=default' '9 10 fg=default' ) ``` where `3 16` is the path I'm trying to `cd` to and `3 4` plus `9 10` are the positions of slashes in the path. However, after this assignment occurs, when I `print -r "${(q+)region_highlight[@]}"`, I get as output ``` '0 2 fg=10' '3 16 fg=4' '3 4 none' '9 10 none' ``` and when the ZLE highlights the line, the slashes are rendered in the same blue color as the rest of the path. If I use any other `fg` value than ` default`, then the slashes are colored correctly. This seems like incorrect behavior to me, on two accounts: 1. It seems incorrect to convert `fg=default` to `none`. From reading the [documentation]( http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting), `none` is not supposed to be the same as `fg=default`. 2. It also seems incorrect to me that `none` effectively does nothing at all. According to the documentation, `none` should mean that > No highlighting is applied to the given context. Instead, `none` just appears to do nothing at all, which seems useless to me; if I don't want to change the highlighting of that part of the line, then I can just not add a spec for it. Do you agree and could someone be so kind as to fix this? :) Cheers, Marlon --000000000000e6039105b175d76e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi there, devs!

I am using `zsh-syntax-highlighting` and I want my paths to be bl= ue, but the slashes in there to be my terminal's default text color. I&= #39;ve tested it and `zsh-syntax-highlighting` correctly puts, for example,

```
region_highlight=3D(=C2=A0'0 2 fg=3D10' '= 3 16 fg=3D4' '3 4 fg=3Ddefault' '9 10 fg=3Ddefault' )
```

where `3 16` is the path I'm trying to `= cd` to and=C2=A0 `3 4` plus `9 10` are the positions of slashes in the path.

However, after this assignment occurs, when I `print -r "${(q+)region_highlight[@]}"`= , I get as output

```
'0 2 fg=3D10' '3 16 fg=3D4' '3 4 none' '= 9 10 none'
```

and when t= he ZLE highlights the line, the slashes are rendered in the same blue color= as the rest of the path. If I use any other `fg` value than `default`, then the slash= es are colored correctly.

This seems like incorrec= t behavior to me, on two accounts:

=C2=A01. It see= ms incorrect to convert `fg=3Ddefault` to `= none`. From reading the [documentation](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.htm= l#Character-Highlighting), `none` is no= t supposed to be the same as `fg=3Ddefault`= .

=C2=A02. It also seems incorrect to me that `none` effectively does nothing at all. Accordi= ng to the documentation, `none` should mean= that

=C2=A0 =C2=A0 > No highlighting is applie= d to the given context.

=C2=A0 =C2=A0 Instead, `none` just appears to do nothing at all, whic= h seems useless to me; if I don't want to change the highlighting of th= at part of the line, then I can just not add a spec for it.

<= /div>
Do you agree and could someone be so kind as to fix this? :)

Cheers,

Marlon

=
--000000000000e6039105b175d76e--