zsh-users
 help / color / mirror / code / Atom feed
* variable expanding to `*` matches a literal `*` in case cond. construct
@ 2019-12-15  8:41 Oğuz
  2019-12-15 10:05 ` Andreas Kusalananda Kähäri
  0 siblings, 1 reply; 12+ messages in thread
From: Oğuz @ 2019-12-15  8:41 UTC (permalink / raw)
  To: zsh-users

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

Although one would expect it to print "match"

    zsh -c 'case foo in $1) echo match; esac' sh '*'

above command doesn't print anything; if `*` is a result of a variable
expansion,
it matches only a literal asterisk. All the other shells I could find
(including ksh
from 2010) does print "match". I know this is a compliancy issue and zsh
doesn't
claim to be compatible with any other shell, I really wonder; was this
intended?
If yes, what was the incentive for that, what's it good for?

-- 
Oğuz

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

end of thread, other threads:[~2019-12-16  5:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-15  8:41 variable expanding to `*` matches a literal `*` in case cond. construct Oğuz
2019-12-15 10:05 ` Andreas Kusalananda Kähäri
2019-12-15 11:04   ` Oğuz
2019-12-15 12:02     ` Andreas Kusalananda Kähäri
2019-12-15 12:50       ` Oğuz
2019-12-15 22:49         ` Eric Cook
2019-12-15 23:27         ` Dominik Vogt
2019-12-16  0:02           ` Perry Smith
2019-12-16  0:03         ` dana
2019-12-16  0:23           ` Oğuz
2019-12-16  0:28             ` Mikael Magnusson
2019-12-16  5:25             ` Lewis Butler

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