zsh-workers
 help / color / mirror / code / Atom feed
* Why zsh chose to be non-compliant in pattern matching
@ 2016-02-26  1:02 Cuong Manh Le
  2016-02-26  8:43 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Cuong Manh Le @ 2016-02-26  1:02 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

POSIX documentation for pattern matching (
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_01)
said that any quoted characters in pattern will be match literally.

AFAICT, `["!"a]` will match `!` or `a`, most of shell behave like that
except zsh (and also ksh):

case a in ["!"a]) echo 1;; esac


print nothing. While:

case b in ["!"a]) echo 1;; esac


print 1. zsh treats `["!"a]` the same as `[!a]`.

Is there any reason for this behavior?

PS: The full question can be seen here
http://unix.stackexchange.com/q/265431/38906

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-29 22:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-26  1:02 Why zsh chose to be non-compliant in pattern matching Cuong Manh Le
2016-02-26  8:43 ` Bart Schaefer
2016-02-29 10:00   ` Cuong Manh Le
2016-02-29 10:27     ` Peter Stephenson
2016-02-29 22:28       ` Martijn Dekker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).