From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2A2031F4B4; Tue, 15 Dec 2020 20:17:06 +0000 (UTC) Date: Tue, 15 Dec 2020 20:17:05 +0000 From: Eric Wong To: meta@public-inbox.org Subject: Re: are Perl regexps well-known enough for command-line use? Message-ID: <20201215201705.GA19710@dcvr> References: <20201214203938.GA31896@dcvr> <20201215142134.gm6fk75gl5wmx6t7@chatter.i7.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201215142134.gm6fk75gl5wmx6t7@chatter.i7.local> List-Id: Konstantin Ryabitsev 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.