From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25635 invoked by alias); 10 Sep 2017 22:12:23 -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: 22891 Received: (qmail 7206 invoked by uid 1010); 10 Sep 2017 22:12:23 -0000 X-Qmail-Scanner-Diagnostics: from 195.159.176.226 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(195.159.176.226):SA:0(-0.9/5.0):. Processed in 1.349525 secs); 10 Sep 2017 22:12:23 -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=-0.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: gcszu-zsh-users@m.gmane.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: zsh-users@zsh.org To: zsh-users@zsh.org From: Emanuel Berg Subject: Re: string overwrites string when echoed Date: Mon, 11 Sep 2017 00:11:39 +0200 Message-ID: <86o9qikxus.fsf@zoho.com> References: <86o9qkqbes.fsf@zoho.com> <170909100149.ZM8451@torch.brasslantern.com> <86shfumrzm.fsf@zoho.com> <170910145027.ZM21093@torch.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@blaine.gmane.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Mail-Copies-To: never Cancel-Lock: sha1:H4Nqr9oux/S9Pn4o+PDIEzZ5sbg= Bart Schaefer wrote: > 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. Right, thank you, the original idea was to have a single function but I did them separately to track down the error. Now I will merge them into a single DWIM function that doesn't output the URL if a single URL is provided, however if two or more are, the URLs will be to tell the response codes apart. -- underground experts united http://user.it.uu.se/~embe8573