Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Shell options during completion?
- X-seq: zsh-users 14813
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: Shell options during completion?
- Date: Sun, 7 Feb 2010 15:22:04 -0500 (EST)
- Cc: Zsh Users <zsh-users@xxxxxxx>
- In-reply-to: <201002072005.o17K5LgH004755@xxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <201002072005.o17K5LgH004755@xxxxxxxxxxxxxxxxxxx>
On Sun, 7 Feb 2010, Peter Stephenson wrote:
> "Benjamin R. Haskell" wrote:
> > Then I guess my question is more PCRE-specific than I'd thought...
> > Is PCRE "usually" available? (For some "most distros"/"most
> > OS'es"/"most users" value of "usually") Or should I just code up
> > the 'fallback' path in my other example (since I'd have to code it
> > anyway for the the doesn't-have-PCRE case)?
>
> It's probably safest to assume PCRE isn't available: pcre is often
> not a package installed by default, may well not be present at all on
> systems that aren't Linux or BSD distributions, and enabling it is a
> special configure option.
Nuts. That's what I feared, but I was heartened by finding it in the
stock OpenSolaris10 install.
> You probably *can* assume POSIX regular expressions are available, i.e
> [[ ... =~ ... ]] with REMATCH_PCRE turned off. That's tested for in
> configure, but I would expect most systems to provide it.
Given that, I'll probably just avoid =~ altogether, unless there are
nice ways to deal with greediness and multiline matching. (i.e. I think
it'll be simpler to switch to zsh-internal parameter substitutions.)
--
Thanks,
Ben
Messages sorted by:
Reverse Date,
Date,
Thread,
Author