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 f8de719b for ; Mon, 19 Aug 2019 13:30:09 +0000 (UTC) Received: (qmail 28818 invoked by alias); 19 Aug 2019 13:29:59 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44693 Received: (qmail 14533 invoked by uid 1010); 19 Aug 2019 13:29:59 -0000 X-Qmail-Scanner-Diagnostics: from mail-wr1-f50.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25545. spamassassin: 3.4.2. Clear:RC:0(209.85.221.50):SA:0(-0.1/5.0):. Processed in 1.713852 secs); 19 Aug 2019 13:29:59 -0000 X-Envelope-From: stephane.chazelas@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.221.50 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HW66nXParEia6OcYnJHH6/sut09gIaIwn/PUKr8wzMQ=; b=LGmy0g+35IyU/HCZ5wgF+B8GzaghZ1/N0ISFRzTN8VtPiuX4RvL9Pb+Wt84r8vFfuO IArxFHTdpwibmHMhqmVjYJvG0/hWOXiRYzXZRpSRlvoAW8PcRizLqaht3dTpaDKQxYir 2/wx+xMNO/84v3KFu/m/q/8we/CkYbus5eJRJW3GcnsoFmTIf5v4Zae5Q+M8v9ZXI2wB ygkUfdQZHvwjmJnvZIIRv+1v+d6D6E5rA/Fmjm9+ocWw92w6pFbiOc8z2Xn8VrMdgzjV R1+s9W9IVAiCp3+kuhnihk3VQGooPlr5S8C29PWHq5Ocgcq+4Ma66sFgDR3cU0boNHVt eWtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=HW66nXParEia6OcYnJHH6/sut09gIaIwn/PUKr8wzMQ=; b=py3mYEDAoMMERN3TSTEkbFsmT6HcON6oWwNA5COoxNU6XLl8yC715jkZYdtvV8kNwP MpNp7W0S0yxMXHL6fxrEYqSaYzGgODFQZq5rAHV1y80QRmm6RJ/PVyo8Kac/Yyfu0Qlu 3bCnSwZ8lKERG6U6P6xACnO+suTp1AyovNyTkDmegH0d57d3VjvMq2AjyDc3FpfbyAOM wlsZJiobkQj6xMkTeugQ/wJkbwOxMe+CNFzJKwljYSsTpPFLRGmEcptMG8YtDnZ+U2B4 iAutUemtkTmWJV+xtHGolMwwAXwKf+aPbBCBINxSfM/rZqX7xQE/aDXaUZuzZ/zS+a9N AbzQ== X-Gm-Message-State: APjAAAWKhaLJcvrWxvAsDCmaPxbD6ulJfp676LD91P0HAZMM3V3dRZEK E39HzCx3vHTVWn1dfdOsSos= X-Google-Smtp-Source: APXvYqyF6IMQP/vIS2sXQK5lkgPyL1XE0T6gFiWhWK1+jwjFyFE9/U9/iVfRkk46XENP3MyEt8EsEA== X-Received: by 2002:adf:93a4:: with SMTP id 33mr28758044wrp.187.1566221363021; Mon, 19 Aug 2019 06:29:23 -0700 (PDT) Date: Mon, 19 Aug 2019 14:29:20 +0100 From: Stephane Chazelas To: Sebastian Gniazdowski Cc: Zsh hackers list Subject: Re: [bug] Problem with functions -s (string arg) math function & specific input Message-ID: <20190819132920.d6kjwlyztvcdt72o@chaz.gmail.com> Mail-Followup-To: Sebastian Gniazdowski , Zsh hackers list References: <20190819070143.diqagwrdxx7ayp2m@chaz.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 2019-08-19 11:59:27 +0200, Sebastian Gniazdowski: > On Mon, 19 Aug 2019 at 11:53, Sebastian Gniazdowski > wrote: > > So it seems that ${MATCH//\)/\\\)} should suffice to fix this problem, > > as it seems that once a string is within parens (correctly), further > > expansions are put on hold for the -s functions. > > Quoting of ( is also needed. It doesn't error without it, however it > then includes the closing paren in the string argument. [...] It appears so. Or more exactly, you'd need to escape any unmatched unescaped ( or ). (input='()' is fine). -- Stephane