From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26714 invoked from network); 15 Apr 2021 23:53:34 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 15 Apr 2021 23:53:34 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1618530814; b=Jzku5zHz8AbJZ0X+ypBCav5bOCav2680EXZkDtehvqoR7mA17pmpwMXgDkEX5+FocFJK1esij1 KWK/Py+DVWvcz3XeYv7EzWUr7cKBEBhB7DueWOdqcewQZcgpjcmqVKCWNiJ1QHxbq6wIbYZAEe RBB06Vhmnnn/iswxHb8ohxWk46TyTlzko2p4SchRKESFvl9zHtbVXrjq6QEdWUKMO8NxxXWz4N HC914V7QzeZl9LoZvyieIl46tALCBTdWQHLURwSJBbt0wHAV/oNuZK4m8N9rmrZ5htjylx5p+l K44+8v1H2CEuFdbvDL8wRTsBWANkdSSiYNJSXwJTwLP6AA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f181.google.com) smtp.remote-ip=209.85.167.181; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1618530814; bh=My3DxSHcdlZd2V2PaiNkM3vV36Vmqr+8RRx2hiQzv7g=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=ZhpGogMc915lwkgT63vyUDvrBoKpzrvVAiAX1ldBPT4lHRl9r3eG0TjCuzp2GobLmTIDAzAniN Lczx1m30AKMIhGMCqcYRWk/kixsEuRJYmsf6b/ZarsBxHNUsIPaQOnvRBQ45YbJ0D/z621zupX 5IcgWdKJURRBukura6gb4ZDftnzvD4Fuu4Cgi2QbKtcXhpDJKui+i1pQcDguVCT9TAX8cgHSIn sBQkQ7oD/0LP3EAIPPv3ZFf90kEPMP9sGIRkZlHCdH6hU5mNsoSoYRi3gakoHfb+fUZ9kNL2du Vm0WeB+cStTBrYRNBYmEgZ6b7nz9Et78uuBqVyl2R28O/g==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=BhUHX5z5vegC5ygDJW9/hn41UFaS9726gFRpK91ou1Q=; b=BywKPXUywmgqsd/uXSRACRe5Kb 4O6bAJ0mKRRyPqngR3/XdCuljFIETtwWgAIuiG04LYt/H/OUjnLqOW6EkH2Uh8hclUh0cHu0UoSZF xeVaR786err3XNl9mX4x2A2jKpmXGw74vqPI24v0EkkwZ466LXBDBzhgPx0KLvsSgzFzZDZ0mp+vN ioVVuLVy7Aui+If6nya1CPWBWaRoN2QV8PBlGFVnyyu3F8OXOykhXMGvfvJccBrmHbnVu9OC9DDJu Km5ZceAb9wTMoXNge0zt+8wTMzhl37ztUFBl152SnmW2odDRFT7FtDVZnr9vJEbmmjn0hoPgmjcJg f9IPBpbA==; Received: from authenticated user by zero.zsh.org with local id 1lXBnd-000IqF-5h; Thu, 15 Apr 2021 23:53:29 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f181.google.com) smtp.remote-ip=209.85.167.181; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f181.google.com ([209.85.167.181]:39639) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lXBn0-000IEi-Lv; Thu, 15 Apr 2021 23:52:51 +0000 Received: by mail-oi1-f181.google.com with SMTP id i81so26079794oif.6 for ; Thu, 15 Apr 2021 16:52:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BhUHX5z5vegC5ygDJW9/hn41UFaS9726gFRpK91ou1Q=; b=bzLr1ZtiYiY+/apXRMHjUemAlUbt4Qvyb5uxyC2QsDsR9PAmRoPK60HYqOutyuFx9o /Ydfw80qXT1j3wG0BQhLN1ks7aPUUF9PYkthiD3NZR5dGOHF/KTGHxvWD9qI71Chyv/F BRC1+Mzi/NKKvuZVdYgao0MBImJ1UDTSraTthn3nkxLW5d1IJjgbAqKdmZ1rVBZl8kfT x/EJJwOo96xRmF+HL4H4V5HJclO5InkN4bK90saA3dEF+T8+9A8wMHr+UV33VzUxbb5r iAI002bTvWShOmM3uP2cwyvV2Ls3sguu1wVGARHQ6jYCxDXBmVsxDzkRo0EjetGzRk7F 62SA== 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=BhUHX5z5vegC5ygDJW9/hn41UFaS9726gFRpK91ou1Q=; b=c4RhIeA3UJRl3vijfAsysKqsvf+g6270XRLh8Sw4ZwpMeUWRP7mlrH9gl/g4K2frNd 1bnORQq0cpR77dthk4tydy+6GPjiduDI0zYdSfj0ZHuZE8Lrr41S7jXZevAa7O+NzziZ yszy0XHNNqjg7U6FWEdrNGTHHKVGWoTMfHN6xCdXNZMn265lzJtUENE5seH6fHLea31G rUI3udzZtyo/axd8XAJ6spo/2Pigzw+lv+8dUN7gN5lvod6b47I6qkNNIPyT60usTyBT Gb8I6RtLi8dxbyzCNyiOlADVMpVdG/Hg8mctGLc7NA/KTvLjtszFRu2nctEbNuFrxVqI jGTA== X-Gm-Message-State: AOAM530M3hSIE578m8/Aw/cX7v2himvYSQGq5DeKrggg6fh2wjmKPJm0 4JYE3qgSpnbnw/WWE2mpk37wZkOMh7jwumj6sw24kwbkXLs= X-Google-Smtp-Source: ABdhPJzUm0C/MyXwOnqpIzobJXBPGWaBBt+IBm2+q52ZXsavyaqRgzZHdfnCyIZ+uRrT/iHKHuGFCht7ygWr1x7OZSo= X-Received: by 2002:a54:4099:: with SMTP id i25mr3094860oii.132.1618530769482; Thu, 15 Apr 2021 16:52:49 -0700 (PDT) MIME-Version: 1.0 References: <20210407070518.szoet4rxbouwzelm@chazelas.org> <2902540a-9c07-4423-b0bb-6802af6e97a2@www.fastmail.com> <48bef9cb-fea7-1a17-96b1-dd4ae7bf54aa@spamtrap.tnetconsulting.net> <20210409224930.GB6760@tarpaulin.shahaf.local2> <41baeb56-de2f-2fb2-3544-ce703bf96223@rayninfo.co.uk> <6717f359-f340-a436-c2dd-1b9ae19d345a@rayninfo.co.uk> In-Reply-To: From: Bart Schaefer Date: Thu, 15 Apr 2021 16:52:38 -0700 Message-ID: Subject: Re: (prefix case terminators?) Re: alias with a parameter To: Marc Chantreux Cc: zzapper , Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 26659 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Thu, Apr 15, 2021 at 12:56 PM Marc Chantreux wrote: > > > However you really don't need that test at all: > > case "$1" in > > ("") false;; > > ([A-Z]|V<->|G*);; > > (*) echo "Yes expand";; > > esac > > i would have written ${1-} so -u can be used. I'm not following that at all: -u where? > also: i really think that using terminators as "continuation" > ease the code reading Entirely my opinion, but I find your example much MORE difficult to read. > * it makes code more aligned Only if you start with the (jarring to me) "in" on a new line. > * it's easier to spot a different terminator than ;; For that, I'd put the terminator on a line by itself, which I would also do if the case branch was more than one line or if the case pattern was quite long, but with short patterns and the terminators all ;; it seems unnecessary.