From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: zregexparse
Date: Thu, 30 Mar 2017 22:19:29 -0700 [thread overview]
Message-ID: <170330221929.ZM18456@torch.brasslantern.com> (raw)
In-Reply-To: <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:
}
} zregexparse
} 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:
Completion/X/Command/_xset
Completion/X/Command/_xwit
Completion/Unix/Command/_ip
Completion/Zsh/Command/_ztodo
Completion/Debian/Command/_apt
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.
next prev parent reply other threads:[~2017-03-31 5:19 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 ` Bart Schaefer [this message]
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 ` zregexparse Sebastian Gniazdowski
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=170330221929.ZM18456@torch.brasslantern.com \
--to=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).