Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weather-units bug #553

Closed
xgqfrms opened this issue Dec 7, 2020 · 3 comments
Closed

weather-units bug #553

xgqfrms opened this issue Dec 7, 2020 · 3 comments

Comments

@xgqfrms
Copy link

xgqfrms commented Dec 7, 2020

weather-units bug

https://github.com/chubin/wttr.in#weather-units

$  curl wttr.in/Shanghai?u

$  curl wttr.in/Shanghai?m

image

image

but the default is OK

$  curl wttr.in/Shanghai

image

@suruaku
Copy link

suruaku commented Dec 8, 2020

It's because there is a question mark (?) in url. You have to use quotes, so like curl "wttr.in/Shanghai?u"

@chubin
Copy link
Owner

chubin commented Feb 28, 2021

The problem here, exactly as @suruaku says, is not the service (or that it handles URL wrongly), but zsh. zsh tries to process the glob (it thinks that it is a glob because of the ? in the name),
and it can't find any file matching this glob (wttr.in/Paris?n). If you run setopt +o nomatch first, it will work without any escaping

b1% curl wttr.in/?N
zsh: no matches found: wttr.in/?N
b1% setopt +o nomatch
b1% curl wttr.in/?N  
Weather report: Regensburg, Germany

    \  /       Partly cloudy
  _ /"".-.     16 °C          
    \_(   ).   ↑ 6 km/h       
    /(___(__)  10 km          
               0.0 mm      
...

@xgqfrms
Copy link
Author

xgqfrms commented Mar 2, 2021

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants