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 26580 invoked from network); 19 Feb 2021 22:16:21 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Feb 2021 22:16:21 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613772981; b=tsK6tcdwrxrC2KH/dwj4gjtVCpcJ1daKxqYbIqKOtwcNHUm7p3LR/HWHwghaRu3InrnHfOLVNL 9wgsWFaJcwWOnnGcTKTd2QfDxgV4xOjrw2V74rgB0AWob/8BfBRQ2I/oXGrHy2kb7/JtwGMRrt h5AIWxM+R6tc2Fh3drcAJFxYwDXJUY3K4cgQkvDHjiRQAqNf725NyZbeK8EfOgxhLY2CevbWQA dng+BjDoLb0Yi1mvzBkz1V/Wi9c6C2W3BXkyDVzBjEkU5l78zmi6PMD52LVYg/c1Kxt4wFnjyy dvBLglqwUaesguschBa52Ia5soKHW+LoGUmeWUbaYz7bpQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f180.google.com) smtp.remote-ip=209.85.167.180; 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=1613772981; bh=JUEE0Y+L4npx+OyosP/W0PkNwpXRp3kJCdd7vZdXvBs=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=ux08ANwUAQwRU90L85nbGwXCp+yRBM4LCLpsJbfF8nXOybzJhSPTxBU9i4+ChOXcZV2ywt8xVE aczi+rJPIrWBu/Cg0YRqy50+h+OGiY36+69ThSXH05A4waDzrpIDhvh+TzhiXMgIdm93DkgJKj UudP3+4erPHtJT2+2G3gqULp/UBnjWE1Oa1oVdBhuazdEXppUtNH02g4CvqTLrJQ/gVqbwyKZV ZVupRHB4Xuz8rEVty2acPHclAJQhfdxDTZ0Bnm+zSEeOjvIhYTZhY+RLcFaVMUiAr5gap1d7ME lvYHyejlFJsnpVQ6VcajnDeoYQcXfBQKrw46+aVhUGFzug==; 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:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=VWlDTyKOUJZXcCUzNhIVcNdLQfGinl9yj67a96pmevI=; b=wbsxF1mbAbpnCoKECbKYXdgbW1 1zPrQB30sE4tVfuOl4PaENwPCyfM+ZdFFz6MzeC29xOiaFYscV6205L/ldWffnNbCh1sVo6pl7+IR a/lZp4DTqCkNiXnwx+qNv+keMqCDMLBQPPqknOxTCk9VJvZ5ynrweVbGM1aFjK5QbdZeSjQkHEe8a ClWFp0oPLLTByBDzg41rrMKbj1MnIxwMquiW8M9VnHB98mouj8h2oIknSKmwaH6eo29f1SEP7bXLq 61iwiVSmrFuXC3Y2BAFrBxwiXLeUb2aOk63Uvw7Ju+XMeO07lI0XV8pEU+nXaJSKcESqMICiKphoo ychWwDbA==; Received: from authenticated user by zero.zsh.org with local id 1lDE4N-0008yc-Cy; Fri, 19 Feb 2021 22:16:15 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f180.google.com) smtp.remote-ip=209.85.167.180; 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-f180.google.com ([209.85.167.180]:38365) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lDE3u-0008TE-3q; Fri, 19 Feb 2021 22:15:46 +0000 Received: by mail-oi1-f180.google.com with SMTP id h17so7470839oih.5 for ; Fri, 19 Feb 2021 14:15:45 -0800 (PST) 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; bh=VWlDTyKOUJZXcCUzNhIVcNdLQfGinl9yj67a96pmevI=; b=jRdcHqDWwqkr1/HUw3TtlyuyUF9Fp6v3od/zHr+lvAhaTDFzwdEi5JIP7ycwaAp5ts 0HoINLJQIh08aRH9PHHkW6NzusVgUGBJaIk9PDyKPlbhZoKtfD+y+eA07cuqfMOTaeT9 CKsWbr9ZYl8XwxEQyR0jAdAiHkGj291CLsqvEvMO4DwJQ3XLv8IJLDy2Rh0u7bNfPooO 6glumqEUttYBWiyHKtSvhs530EE27H5k+jPYsA1vpwBFrsF5HNbvn0XzEP80si1Xl3yg nqg0GgJuvL/3qRrV8GVsQbRjO+je0DVOjPB5ma2TTjRt/Xst2Ozn4QYRf9fnNgVygnhl 1uxg== 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; bh=VWlDTyKOUJZXcCUzNhIVcNdLQfGinl9yj67a96pmevI=; b=k2shb3QuWZcSe1CWuiwXssKeIC77hPZ2KNgtkg0N71kb6XmMuWim9UI/pghCgkKpxN yd6cNbSUCxoj3e9AWvCcbii9rIm+bNEEHleuU4WH2tQNHf/8in63oBDAQA5zIwFMCk5X W/XlHIyx9UAnVGyE48d6HfoBe5W/5Hp+jnA4MTkcUNPEVtY9WUEvWCsHsyBfPWzH2GpJ U92NjocHSA+UvsNf/QbHhkfeIFCBvAtS4yhtU7K340158nPwaBO+TWohhXUFYu9zx1xA veAMtcVV/QgCM4zjd0ScRT22TDsQPm/GerzaQ6n7uv9VXjUwlqWX22vDLDJ+p5tUThHx VGoA== X-Gm-Message-State: AOAM530C2SuiS8vNoq5R7sjBlQsujDNVlmI3gr+qKKfDcyHdfYAUX1Ks QSbYNZVnMh8AdkK5Su3LcZbWobrvY0gx2xFp8KSWyclyo4jclU8q X-Google-Smtp-Source: ABdhPJwGZMYo7HoeAIlUYQw6TCOzfbKW6GsTTi+mGcGrHKNBJxUiHat1PNV78nRGj2YLuj3jkGZlvUuD3cH26EhrIdE= X-Received: by 2002:a05:6808:258:: with SMTP id m24mr8263340oie.132.1613772944424; Fri, 19 Feb 2021 14:15:44 -0800 (PST) MIME-Version: 1.0 References: <20210218134039.GA1492462@zira.vinc17.org> <8b3a9f93-5eb4-4d4d-8312-58c371e12239@www.fastmail.com> <20210219121705.GA1706306@zira.vinc17.org> <20210219122914.GB1706295@zira.vinc17.org> In-Reply-To: <20210219122914.GB1706295@zira.vinc17.org> From: Bart Schaefer Date: Fri, 19 Feb 2021 14:15:32 -0800 Message-ID: Subject: Re: auto-quoting inside braces in arguments To: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 26547 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: Archived-At: On Fri, Feb 19, 2021 at 4:17 AM Vincent Lefevre wrote: > > For instance > > echo {ab cd"ef }" $ZSH_VERSION {0..2} } > > should be equivalent to > > echo "{ab cdef } $ZSH_VERSION {0..2} }" I think the other problems with this scheme are going to scuttle it anyway, but I would point out that for every other quoting mechanism, the quotes themselves are removed (leaving only the string that's between them), but here you are suggesting that the braces remain in the result. On Fri, Feb 19, 2021 at 4:24 AM Vincent Lefevre wrote: > > On 2021-02-18 10:52:01 -0800, Bart Schaefer wrote: > > > > { echo what does {this mean} > > This happens to be just because of the space before "mean", Obviously, but isn't the point of your suggestion that said space would no longer be significant? Which is a problem for current usage. On Fri, Feb 19, 2021 at 4:29 AM Vincent Lefevre wrote: > > though this would introduce a difference. Currently: > > zira% echo {{a..c} > {a {b {c > zira% echo {{a..c}} > {a} {b} {c} > zira% echo {a..c}} > zsh: parse error near `}' The first two are more problematic than the third. In fact, the third one wouldn't be changed by your suggestion at all, as far as I can tell.