From: Sebastian Gniazdowski <psprint@zdharma.org>
To: Bart Schaefer <schaefer@brasslantern.com>, zsh-users@zsh.org
Subject: Re: zregexparse
Date: Sat, 1 Apr 2017 12:21:54 +0200 [thread overview]
Message-ID: <etPan.58df7f42.140e0f76.17199@MacMini.local> (raw)
In-Reply-To: <170331141359.ZM24862@torch.brasslantern.com>
On 31 march 2017 at 23:15:31, Bart Schaefer (schaefer@brasslantern.com) wrote:
> } 1, 1, 1, 1, a
> } 3, 3, 1, 2, bc
>
> The return values from zregexparse are pretty strongly tailored to be
> used with compset and compadd, and it does nothing useful with $match
> and friends -- it's not tied into glob pattern referencing at all.
>
> The values stored in $p1 and $p2 here are intended to calculate offsets
> into "abc" for a call to compset -p, which isn't going to help you with
> ranges for highlighting. Also (though not significant in this eample),
> zregexparse expects words joined with $'\0'.
Let me just express regret about this outcome. Redundancy is a cool thing. I was able to filter $history with (M)/:# and (R), and (R) turned out to be faster. zregexparse could prove its value in e.g. static build without zsh/regex. One IRC user once reported problems with some completions, because he sincerely configured BSD port as static build (no zsh/regex by default). I then quickly removed regex usage from _hosts, but the patch wasn't accepted, maybe because the problem wasn't highlighted (that said, I may naively equate zsh/regex with zregexparse, but it's just that shipping own regex engine is extreamly cool, at least for me). I once wrote simple ANSI color codes parsing using (#b), wonder if here the zregexparse could do something, but it would have to be able to progress across text, and lack of mend seems to be a problem.
--
Sebastian Gniazdowski
psprint /at/ zdharma.org
next prev parent reply other threads:[~2017-04-01 10:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 8:46 zregexparse Sebastian Gniazdowski
2017-03-31 5:19 ` zregexparse Bart Schaefer
2017-03-31 5:53 ` zregexparse Sebastian Gniazdowski
2017-03-31 6:58 ` zregexparse Sebastian Gniazdowski
2017-03-31 21:13 ` zregexparse Bart Schaefer
2017-04-01 10:21 ` Sebastian Gniazdowski [this message]
2017-04-01 16:43 ` zregexparse Bart Schaefer
2017-04-01 23:21 ` zregexparse Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=etPan.58df7f42.140e0f76.17199@MacMini.local \
--to=psprint@zdharma.org \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).