Closed eproxus closed 13 years ago
Hmm. Strange behavior. I'm not sure what to make of it. I did a little test here: micha/resty@fea541b619c6cdee921de68139bdf46415f3f9a6
I get the following output in zsh:
micha@eels:resty% GET / -H asdf
curlopt[1] => '-H'
curlopt[1] == '-'
curlopt[2] => 'asdf'
curlopt[2] == 'a'
curlopt[@] == '-asdf'
Expected output (in bash it seems to work fine):
micha@eels:resty (test)$ GET / -H asdf
curlopt[1] => '-H'
curlopt[1] == '-H'
curlopt[2] => 'asdf'
curlopt[2] == 'asdf'
curlopt[@] == ' -H asdf'
Do you have any idea what could cause this?
I think zsh is splitting "$i" on characters for some reason, or something. Very weird behavior.
I can confirm the same behaviour on my setup:
$ GET / -H asdf
curlopt[1] => '-H'
curlopt[1] == '-'
curlopt[2] => 'asdf'
curlopt[2] == 'a'
curlopt[@] == '-asdf'
My zsh-fu ends here, though.
Okay, I think we got it now. Version 1.4 has the fix.
Yup, that works! Thanks a bunch!
Excellent, I will close this issue.
It seems that the flags are not passed to curl correctly. They are ignored:
Compared to curl:
Using resty 1.3 under zsh 4.3.9 (i386-apple-darwin10.0) on OS X 10.6.6.