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.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 242e5c5f for ; Wed, 9 Oct 2019 13:42:31 +0000 (UTC) Received: (qmail 8315 invoked by alias); 9 Oct 2019 13:42:24 -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: 24335 Received: (qmail 29980 invoked by uid 1010); 9 Oct 2019 13:42:24 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f48.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25594. spamassassin: 3.4.2. Clear:RC:0(209.85.217.48):SA:0(-2.0/5.0):. Processed in 1.53556 secs); 09 Oct 2019 13:42:24 -0000 X-Envelope-From: sgniazdowski@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.48 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=GMwSHxXHH2K0NnbjQzhbqZGegigQCYkwMvHRDNLAWUA=; b=VcHQ8HjLJrmdFhJ1J6zA8i+I4rPZ5Kq7rQCYQ/EI5OG4l+ZTA1EqYrqB3+VAqibBGg kQ4gR1NzkzAwVAzcxRYtFd3fzQwd6DHQq5HpHBPK9axP3cvNrKvM12PsCkvLtNyPsTZv FQDZtmZUeEKFaXOx33YiclveQuaMYVPJrWK6v1ZUlk0banwKuPwbJh+EJni4usVosIPu BpkeNn4gqbcjyBVMmuERI0tY/H7RFSwWZgaCHsTH3MyU/iUear4JVShP4dpyjYyvxn9q c0D74WJiDsvTyeqV0bgO24zwPoovNc3vZ7LVlgdN24NE59PLKkPqOCFJfpkD8nYmdHrQ Egew== 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:content-transfer-encoding; bh=GMwSHxXHH2K0NnbjQzhbqZGegigQCYkwMvHRDNLAWUA=; b=V5xznjc1mQXgj5MstXdn75G+fUO054gE3qo90+V/CMt7U8gj4feJbi9A/Q+DITaSpz g1zj3FBFWdvJ5mii/wN4k6M5WhYr+8bB/4BWcUD3JPYHFjXZmwbdO4J1kicQV01ko9Zq JK9lDMz+QWgwzt+N9f9AQWxYC+pO/SjHXS2qar+2tJYnejT5ajwDwVl9+CWxr1CM6CuH 2nR/5IBkPrEqD+lm25lgOBAD0Qq3ZDBEB2ciu7C3wb3psA0YakbC00pjTHK+/U2YAP77 J3Iw/0BVs6xVfykOvzoX+lnVksiS6F6jtGS6Sv0Yn+feFHCdN1zv4JyLtxP+7D3m20ob nMEA== X-Gm-Message-State: APjAAAXEQDak3/ohUej/1J4Hu/fFUizcE6uWZWv0esBuq/M5K3/hBgUe 4uX14qhlb6IyWK+adg9EzAEYmsxBJero+gb/NVmvEjh0 X-Google-Smtp-Source: APXvYqz7W8dbbw0FHOoXA99emS5x/U1eDqHokmgKlP2U13G9XRg4Rp4GzauGkdtYLn+fp2fmuXemLx+EOG+mIS8mBTo= X-Received: by 2002:a05:6102:21aa:: with SMTP id i10mr1892639vsb.77.1570628509983; Wed, 09 Oct 2019 06:41:49 -0700 (PDT) MIME-Version: 1.0 References: <1570627441.5764.11.camel@samsung.com> In-Reply-To: <1570627441.5764.11.camel@samsung.com> From: Sebastian Gniazdowski Date: Wed, 9 Oct 2019 15:41:41 +0200 Message-ID: Subject: Re: Feature request: a new warning option To: Peter Stephenson Cc: "zsh-users@zsh.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 9 Oct 2019 at 15:25, Peter Stephenson wr= ote: > > Hmm... that's fair enough, but if you're happy to trade off against > readability I think you have to take possible difficulties with the > syntax on the chin... I thought that: [[ -z $ver ]] && ver=3D"unknown (no .git/refs/heads/master)" || ver=3D${ver= [1,7]} is more or equally readable to: if [[ -z $ver ]]; then ver=3D"unknown (no .git/refs/heads/master)" else ver=3D${ver[1,7]} fi especially if I would format it like I would today: [[ -z $ver ]] && \ ver=3D"unknown (no .git/refs/heads/master)" || \ ver=3D${ver[1,7]} but I'm seeing your point. This is like commenting or not the code =E2=80= =93 I was for a long long time pro-commenting, to just drop it recently, actually finding pleasure in writing a condensed, I could agree =E2=80=93 (less /un)readable code. --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org