From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2311 invoked by alias); 10 Sep 2017 21:49:08 -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: X-Seq: 22890 Received: (qmail 10714 invoked by uid 1010); 10 Sep 2017 21:49:08 -0000 X-Qmail-Scanner-Diagnostics: from mail-io0-f195.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.223.195):SA:0(-4.2/5.0):. Processed in 1.842319 secs); 10 Sep 2017 21:49:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_SORBS_SPAM,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=1MC9GFRstPqfvLVWKEgjE6NdkSl/sYVA0m/IVSi37hM=; b=aQdZ29bDNwtB/t+zTlJJDRLEGGKkZB7g5xNjdM1em7DbftVkW5bLvC+2wmas7aZ6Cs Kf810+wVMXrTYkZWARTtj4WEyq33xBcAGQ0BC/oSFnaHIhImDgisSspUzzxM/X6d0/TS yf+SkL29ryQ5r4Vc86iz076OnkYFTKF9UnbeDof9S0TFv6MCoJI3+oUFmCqPgBIQ88VE CqcRclg0arcpal+nWvE8xSsUXqVDRlsMvr8VFiyCUe2qxGYw+6Yipci+k2OGfWNGlaLN ji2bWNYlc9WuQG4xEXWkJECu+urYB+YG7g76RjSgY7lwckgtBL0Ko5+7vhSJ3KRkR2Yq yCsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=1MC9GFRstPqfvLVWKEgjE6NdkSl/sYVA0m/IVSi37hM=; b=iv1xmBY76Lj1pc1zGDx6dVrCUhqRbDfHYsjOmP2t3LArjFQvGYWoXIS3UXyz9HcUhY 3+6lkgqmpdAShEa4+JAE2ksnjXKgWLONRvEfctFev/CsNk1OholSHVVYKifKQnk2UV14 r+Tr25PEbVvCMD02lvn5/3SSZEY4sMH40UdLEv5XZZlMkCGwbbdiJDhSIME2Z/yGTAmG 5jIDNhYxlinrY415ZJ019tWGOmiwi5OvaPft8XYBpR5/jNu2B/sGz1oS1nF+6O3JU6F4 obmmwlF1SrYXyz0XY1EwDePg9LDcIsz+zXconPUYBBHYGyUc8c51R0qd2HZhReooVgE5 hpbw== X-Gm-Message-State: AHPjjUguU1T057DQjddaTCWpjN1DIBb0xxsbGZc2WzN3ln8vL+/MZiMM npnHQ50Hl1/GMIq5rQg= X-Google-Smtp-Source: AOwi7QCdHc662o0UpcVFMXTP2NLLaLmVHA1+ZOIeMbUBR5Zvf5E4zxy1tHxbFKQChM5JN6IJ/VdH2Q== X-Received: by 10.202.102.139 with SMTP id m11mr8176559oik.309.1505080144117; Sun, 10 Sep 2017 14:49:04 -0700 (PDT) From: Bart Schaefer Message-Id: <170910145027.ZM21093@torch.brasslantern.com> Date: Sun, 10 Sep 2017 14:50:27 -0700 In-Reply-To: <86shfumrzm.fsf@zoho.com> Comments: In reply to Emanuel Berg "Re: string overwrites string when echoed" (Sep 10, 6:35pm) References: <86o9qkqbes.fsf@zoho.com> <170909100149.ZM8451@torch.brasslantern.com> <86shfumrzm.fsf@zoho.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Emanuel Berg , zsh-users@zsh.org Subject: Re: string overwrites string when echoed MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 10, 6:35pm, Emanuel Berg wrote: } } > The value of $reply has an embedded } > carriage-return. } } echo "${(V)reply} $u" works, only how do I drop } the ^M then? There have been several reasonable replies to this, but it might be useful to point out that the ^M is there in the first place because curl is emitting it. A quick glance through the curl documentation doesn't reveal a way to prevent that. You could strip it off when postprocessing the curl output in your url-exists function, which might prevent confusion if you ever use that separately from the urls-exist wrapper.