zsh-users
 help / color / mirror / code / Atom feed
* howto run curl again with quoted argument if it failed due to parsing error?
@ 2018-09-30 13:54 chiasa.men
  2018-09-30 14:02 ` Pier Paolo Grassi
  0 siblings, 1 reply; 2+ messages in thread
From: chiasa.men @ 2018-09-30 13:54 UTC (permalink / raw)
  To: zsh-users

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?



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-30 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-30 13:54 howto run curl again with quoted argument if it failed due to parsing error? chiasa.men
2018-09-30 14:02 ` Pier Paolo Grassi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).