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=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 e2e0e298 for ; Mon, 16 Dec 2019 00:04:24 +0000 (UTC) Received: (qmail 27228 invoked by alias); 16 Dec 2019 00:04:17 -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: 24551 Received: (qmail 16546 invoked by uid 1010); 16 Dec 2019 00:04:17 -0000 X-Qmail-Scanner-Diagnostics: from mail-yw1-f45.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25663. spamassassin: 3.4.2. Clear:RC:0(209.85.161.45):SA:0(-1.9/5.0):. Processed in 2.65966 secs); 16 Dec 2019 00:04:17 -0000 X-Envelope-From: dana@dana.is 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.161.45 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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=r4c5BSlpcTk/uFvvIUb5Iayqy2bXTdHPrDAPCu8AR/s=; b=Dk7PKQ/16rdmHitwhQp6yalbc56tZT3tKxQjKs4N92Bei0bmo8GKM4Y2jJYyiA/u8A GGE03XxlSlQfMvJMewOec85FhsNruj6HkV7+8t0VDGWJp7QgStJZ1ybya9WjfdDhrM3c kGvPlnUcipsM8nRpTry1S+P+kj0qkCr4RzJRH+J+yZbQ0gJyGf73KMQeNGXkzCHCtYCp pdQck5WZ1p9v38TVeSFWeDp7ccLOHxgT9wlUo5m6eqxineI3pF/+z473j2PA0EOtgXTe E7o0pkYbHczL5Bxp4qAMQRyImTmdPAs3VfVCOGg/5F27uEspIgFztsKKM4rhdt+RbYAU Ew2Q== X-Gm-Message-State: APjAAAWmJKh6XiDrn/Lw576QMYTFfcT4zGHQ/7q6evgvmaZRnrUy0san EYEEY2oT1Vt6LnzY4OGDIY2gcg== X-Google-Smtp-Source: APXvYqzpenwFKpkmiQEBwRh/w2tH5mxMaPJUXu+KSW3QI0KTH0wgHtNvth9LW/ovFsVMku3Rs/7kPw== X-Received: by 2002:a0d:c947:: with SMTP id l68mr11936180ywd.197.1576454621431; Sun, 15 Dec 2019 16:03:41 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: variable expanding to `*` matches a literal `*` in case cond. construct From: dana In-Reply-To: Date: Sun, 15 Dec 2019 18:03:40 -0600 Cc: andreas.kahari@abc.se, Zsh Users Content-Transfer-Encoding: quoted-printable Message-Id: <6C537986-6091-4EF2-AA85-EB3391DF5F27@dana.is> References: <20191215100507.GA23773@pooh.my.domain> <20191215120231.GA18473@pooh.my.domain> To: =?utf-8?B?T8SfdXo=?= X-Mailer: Apple Mail (2.3445.104.11) On 15 Dec 2019, at 06:50, O=C4=9Fuz wrote: > 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. Not to pile on, but, just to be clear, since a lot of people still seem confused on this point, or at least they're imagining unlikely = scenarios: Apple have changed their default *log-in shell* to zsh. /bin/sh is still /bin/bash (though it seems like they might switch to dash in the = future?), and both of those still work exactly the way they did before. You still need = to go out of your way to write scripts that run under zsh. Even if you use zsh = to run a shell script without an interpreter directive, it will run it with /bin/sh. It's true that commands you copy and paste into your shell from the = Internet may not work if they use certain bashisms or (probably ill-conceived) = features of POSIX sh, but (a) in my experience it's very rare that you're asked to interactively = enter commands that make use of features that differ between zsh and = bash/sh (i certainly don't see case/esac used much on the command line), (b) it was *always* the case that those commands might not work on any = given machine =E2=80=94 the person giving the command has no idea if = whoever they're instructing is using tcsh or fish or anything else, they can't just = assume that it's bash or even Bourne-like. On 15 Dec 2019, at 06:50, O=C4=9Fuz wrote: > 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. I think this was added in zsh 5.5, which was released a little too late = to get added to Bionic. Eoan and Focal are currently up-to-date. dana