unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: Re: are Perl regexps well-known enough for command-line use?
Date: Tue, 15 Dec 2020 20:17:05 +0000	[thread overview]
Message-ID: <20201215201705.GA19710@dcvr> (raw)
In-Reply-To: <20201215142134.gm6fk75gl5wmx6t7@chatter.i7.local>

Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> On Mon, Dec 14, 2020 at 08:39:38PM +0000, Eric Wong wrote:
> > I've been thinking a bit about UI/UX for local command-line
> > tooling, and one thing I've been pondering is exposing Perl5
> > regexps as a mechanism for filtering
> > mailboxes/newsgroups/URLs/pathnames, etc...
> 
> I think it's best to stick to the same regexp flavour as used by git for 
> things like "git log -S", since people most likely to use this 
> functionality are the same people likely to use git.

That's my first choice, too

> I believe it's POSIX, not PCRE -- but I don't know how reasonable it is 
> to support POSIX regexps in Perl.

There's an re engine for POSIX regexps on CPAN, but it's not in
any distros.  A strong dependency on Inline::C would make it
harder to install.

All the stuff that's in Xapian can be filtered using the normal
search terms and wildcard support in native Xapian; which can
includes all of what's in the proposed ls-* commands.

I think that leaves pathnames and URLs (IMAP/NNTP)
for --exclude=PATH/FOLDERS and --include...
globs with '?' and '*' support is sufficient, there, I hope.
No need to introduce users to IMAP vs NNTP wildcard differences.

      reply	other threads:[~2020-12-15 20:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 20:39 are Perl regexps well-known enough for command-line use? Eric Wong
2020-12-15 14:21 ` Konstantin Ryabitsev
2020-12-15 20:17   ` Eric Wong [this message]

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

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201215201705.GA19710@dcvr \
    --to=e@80x24.org \
    --cc=meta@public-inbox.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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).