zsh-users
 help / color / mirror / code / Atom feed
From: Oğuz <oguzismailuysal@gmail.com>
To: zsh-users@zsh.org
Subject: variable expanding to `*` matches a literal `*` in case cond. construct
Date: Sun, 15 Dec 2019 11:41:38 +0300	[thread overview]
Message-ID: <CAH7i3Loe=j+cQXOCMKyy0=efmRxkzaONqaiCYpn9oA--_cYg3Q@mail.gmail.com> (raw)

[-- 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

             reply	other threads:[~2019-12-15  8:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-15  8:41 Oğuz [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH7i3Loe=j+cQXOCMKyy0=efmRxkzaONqaiCYpn9oA--_cYg3Q@mail.gmail.com' \
    --to=oguzismailuysal@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).