Zsh Mailing List Archive
Messages sorted by:
- X-seq: zsh-users 22641
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: zregexparse
- Date: Thu, 30 Mar 2017 22:19:29 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=W3dRZA688tfc96DQPJszuTkucQ5MfKuV3rF0OhBKLJs=; b=D60XsHfhsZm1zpRebVos5/0ABHxd+O6Fb+0b4ZV1fGkKFi0FDEcghVhHB3OWLQoBkX POBnjPoe96qnUT6jOFaf902VN/b8PM0KyAXde2rUS9uesm5XYoqJWD36w6kKzz9LN67O 46UrCdAGg7LwcQW/mxgAXRCbsDk6f1rAifYqjY/uKIXd2iZdGE4R2Vtk9jP0ijJo2Ykd pKcbV20A7v15CnohEWJ0FlcOQXFbnfc8PKMVT1ObvsZYGblLZfwYXUT1C/WocrBs8wQh sfK8N6vomejH7cD1AlHOSqCiH7eKkUQHik6PketSIJtJYaoBMvHPaORaeHq4Ug3oKtwh xkqg==
- In-reply-to: <etPan.58db747f.515f007c.17199@MacMini.local>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <etPan.58db747f.515f007c.17199@MacMini.local>
On Mar 29, 10:46am, Sebastian Gniazdowski wrote:
} I've stumbled upon zregexparse. Verified that it doesn't auto-load
} zsh/regex. Manual says:
} This implements some internals of the _regex_arguments function.
} Test V02 suggest this is a very capable tool. How it is compiled, with
} use of LGPL Gnu regex?
It has its own simple regular expression matcher, towards the end of
the zsh/zutil module. There's no borrowed code, except maybe the
algorithm from a textbook.
This was invented during the time when it had been decided that there
should be separate documentation for developers and users, so the yodl
doc was deliberately sparse on things only developers were supposed to
need to know about. Probably a poor decision in hindsight, as in many
cases the doc for developers never got written.
} I wonder what use cases might it have
It's used in the following completions:
The Completion/Base/Utility/_regex_arguments file contains what little
doc there is for the syntax.
There are probably several other completions that could do better on
context-sensitive arguments than they do with _arguments, if only the
use of _regex_arguments were a bit less impenetrable.
Messages sorted by: