From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-users-return-23688-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=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 24581d44 for ; Sun, 30 Sep 2018 13:55:23 +0000 (UTC) Received: (qmail 11390 invoked by alias); 30 Sep 2018 13:54:59 -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: 23688 Received: (qmail 13109 invoked by uid 1010); 30 Sep 2018 13:54:59 -0000 X-Qmail-Scanner-Diagnostics: from mout.web.de 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(212.227.15.3):SA:0(-2.6/5.0):. Processed in 0.83216 secs); 30 Sep 2018 13:54:59 -0000 X-Envelope-From: chiasa.men@web.de X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | From: "chiasa.men" To: zsh-users@zsh.org Subject: howto run curl again with quoted argument if it failed due to parsing error? Date: Sun, 30 Sep 2018 15:54:52 +0200 Message-ID: <2227420.SXgfRXvH8g@march> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" X-Provags-ID: V03:K1:Wu7KWTpXU5L4EoDGnUVO814JuFVGBUyqIL8Ir9u5AkAvzuhFRE7 ynuPwkLgObzDEHtnUWvdStPCP4q8CpVmIFuzipDj2t8GJLIHmxn37/P9D2lSZe50b+2R+ft EpBJcvBTeRzYa3jufj/prygJKK8aKTu2z7HfwY4ol2Y/oyiUJMr6pbAOxiGnwiC9oxa6XWl KEfweu9xz7NIwItFp/2cw== X-UI-Out-Filterresults: notjunk:1;V01:K0:fxVfoFTb10g=:+RxF4YFOEDmAKT3d/Sw8w5 OzruxgJCoq4PxW1Rbe9HHPhZuZ04BNrbhit3e0KIhX2N3wgVkxI830+GWltg28lo8i/WiXFAF A5YXRxAiSOVkwPKlyzStvFP8gjrtSPntLhAFxj84Myk1Hvb9GHdz6djcPd2LykeavU3n0GLdk ZAwo0XFoLAOsXJPXsatZTi45IDcVRxdcDroKjuRi3yryDijw+tbLEZzvkDDyyOW5nAPNwL15f Bh2EgNpwt32mmNnyaaFY5G9hHKm9vYr8Vmnd9TKxiQ0AV2Rvd+iAIUAdu5nWtmY391tQuMzPh wlwE5hLxDsrbyMI163U7Tyw9Alf96TSQVNl2L0esbWUlIeg/ffY8YcgHZyhjTq0kT+FRnlx0T CVVUkt9T/4UIN0gzH1Ai+j41Oecfuv/mKJaUsPFnBJngGc8NvLJx1D8YS/GAuRnjq4I0IE+mm l8fR2phHpI1GadiBCZFEiv8/aCgsiP8ulho1RhvAfdigeXG+kp9cmzMN9w8QwUIQIYB5LbuWk CsNnqna4IRD/6JpEgXOYeRsz/RMcydmoLWiWg2fP4gfHWtobG40K37z78DFAlUmMBSbpbkpeI VV+KeshCo+V1N7c1/LJk3KAcXrvjea/AOmsjMjiMP5qjlVrsPtOUH3rZTeLvsMliyd3Y+jExX mGPfdCaxpJAoGdDO/479xYE/u41QOPhruSQxlFJcaYQCMPDvgF6wFQva6/L2RXJ4Fhu8lSciP nfbXVSsDNM+ZsBTaVHicD3SrrRvdN9BKaFza5/vxdKudL21PooEsraNqqwZqkZUMpyyoMgant f9UhP2orPcsf7sr1tZ7vOVUo09qqQudYACtDRfCJQxBhywyad4= if you call e.g. curl with a link that contains an & zsh says: zsh: parse error near `&'. Is there an zsh idiom to fix that? I came up with curl ^@|ctrl+shift+v|esc'. I also tried sth like !!:*:q but that doesnt return the whole link (only a part of it) curl https://www.google.com/search?q=test&ie=utf-8&oe=utf-8&client=firefox-b-ab zsh: parse error near `&' echo !!:*:q echo 'https://www.google.com/search?q=test&ie=utf-8&' https://www.google.com/search?q=test&ie=utf-8& Is that related to my zshrc entry: WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' or intended behavior? It breaks at a 'o' it seems.. Strangely :0-$ gets the whole link: echo !!:0-$:q echo 'curl' 'https://www.google.com/search? q=test&ie=utf-8&oe=utf-8&client=firefox-b-ab' curl https://www.google.com/search?q=test&ie=utf-8&oe=utf-8&client=firefox-b-ab Why is that?