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

variable expanding to `*` matches a literal `*` in case cond. construct



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


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