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

Re: -prefix conditional expression operator



>>>>> On November 18, 2009 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> You've got the right pattern syntax, but the patterns must be quoted:

>    [[ -prefix '(\\|)\^/' ]]

> Module-supplied operators like -prefix can't change the shell's basic
> syntax rules.

Ahh makes perfect sense.. thanks!  I'd kinda already figured that out
without fully appreciating it, because when I wanted to match '^/', I
needed to use '\$/' (without the quotes).  So I really want '(\\|)^/'
(including the quotes this time).

Greg



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