Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Shell options during completion?

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.)


Messages sorted by: Reverse Date, Date, Thread, Author