From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 7d1d5099 for ; Sun, 15 Dec 2019 21:06:11 +0000 (UTC) Received: (qmail 19898 invoked by alias); 15 Dec 2019 12:51:13 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24541 Received: (qmail 6508 invoked by uid 1010); 15 Dec 2019 12:51:13 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f41.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25656. spamassassin: 3.4.2. Clear:RC:0(209.85.217.41):SA:0(-2.0/5.0):. Processed in 4.049167 secs); 15 Dec 2019 12:51:13 -0000 X-Envelope-From: oguzismailuysal@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.41 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+0Argn8BzNKYXisEHADKeefUloJBLPw1noj0ukucGBw=; b=bi4b9bnW818QXXNQNZj4bTggU3u+vhyGEycW1Mz+e6XySDldIDIj/dB3r9t0lfaZmT SHt6DXBrQwj8Kt4uijgJ6B1tYKBrxmlxT4YfgrSzoWUsrDtQ7boRzLhpwMbaYNlBs5nU TTuq7DedeItWl8KoCPml7UyoY88BjD8IO4yNOKORrpcXCeMTyGc7ArTlsz5BoPYjvewD xUKaklK+d9vLppMv4PfCvAx1MoHrGTATRURhHpRHIVmRiWu3JvoDnTCtmUmnGKkMisN0 UUdyKlH7dtuFo4onvPYM7iNrekJWaAb9tUI5YKCwrKqf6cHi4UmcRoSm3UtKs0lUhVhv imrQ== X-Gm-Message-State: APjAAAWoP72MrUqhAET4qTAU0ZEjTrx8DWDuko8Fa/JmuEQCKKl/xoOR kqYxpIIbFCK9jAPDqt1RWxeBPHbKOQ6BR6sVtU9wMkUvJbc= X-Google-Smtp-Source: APXvYqyLKjILEDkN2uxBF8Jqo98QGhkpV8ftrelwQ3BoqKJGbSMxLw2Zf/okM8u6jSJsgomgGx1yoTtL1xvaVq3ucS8= X-Received: by 2002:a67:1104:: with SMTP id 4mr17498548vsr.117.1576414235401; Sun, 15 Dec 2019 04:50:35 -0800 (PST) MIME-Version: 1.0 References: <20191215100507.GA23773@pooh.my.domain> <20191215120231.GA18473@pooh.my.domain> In-Reply-To: <20191215120231.GA18473@pooh.my.domain> From: =?UTF-8?B?T8SfdXo=?= Date: Sun, 15 Dec 2019 15:50:20 +0300 Message-ID: Subject: Re: variable expanding to `*` matches a literal `*` in case cond. construct To: andreas.kahari@abc.se Cc: zsh-users@zsh.org Content-Type: multipart/alternative; boundary="0000000000008522570599bd8aa0" --0000000000008522570599bd8aa0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Dec 15, 2019 at 3:02 PM Andreas Kusalananda K=C3=A4h=C3=A4ri < andreas.kahari@abc.se> wrote: > > The fact that zsh does not (by default) perform splitting nor globbing > on unquoted variables is a well known feature of this shell and one of > the things that sets it apart from more conventional POSIX-like shells > like bash or ksh. > > Well-known by experienced users. Since MacOS switched to zsh, and MacOS's userbase mostly consists of people who have no idea what they're doing when it comes to command line; I think it's not unreasonable to expect them to complain about how shell scripts/commands they find on the internet doesn't work on their precious cheese graters. That's my concern, maybe I'm wrong, I don't know. > Wanting to write scripts that "works with any shell" is IMHO a > misdirected efforti (why would you want to run code written for one > language with the interpreter for another?). I agree with that, but still, most shells out there are compatible with each other to some extent. I just expected zsh too to be so. However, since this is > something that people seems to want to do, zsh provides emulation of sh: > $ zsh --emulate sh -c 'case foo in $1) echo match; esac' sh '*' > match > > See the "emulate" built-in utility in the zshbuiltins(1) manual. > I guess this is a new feature. The latest version available on Ubuntu 18.04 repo doesn't have such an option as `--emulate`, you need to call `emulate` from within the script; which is even worse. Once again, I'm dissapointed with and somewhat annoyed by zsh. Thanks again. --=20 O=C4=9Fuz --0000000000008522570599bd8aa0--