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

Re: 'case' pattern matching bug with bracket expressions



On May 15,  9:48pm, Peter Stephenson wrote:
} Subject: Re: 'case' pattern matching bug with bracket expressions
}
} On Fri, 15 May 2015 09:38:51 +0100
} Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
} > I don't think changing the case parsing to do proper words is *that*
} > difficult --- it's always been a bit of a hack, so could do with
} > being fixed.
} 
} I'm on the case, but just to note this isn't completely benign.  There
} are (few) places in functions where we rely on the fact that anything in
} parentheses is parsed as a single quoted string, which won't happen any
} more.

Hm.  It appears we always parsed this "correctly" when using the old style
case statment:

torch% case "foo bar baz" in
case> foo bar *) echo here;;
zsh: parse error near `bar'

So perhaps the most benign thing is to apply the word parsing inside the
matched parens only in some sort of POSIX mode?

} I don't want to have to propagate the
} existing hack any more, however, so this isn't really possible to work
} around.

Urm.  OK.



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