MacOS curl error: “zsh: no matches found”

I’ve seen this error before with MacOS’s zsh and I can never remember what the issue is:

> curl https://localhost:8080/example?email=test
zsh: no matches found: https://localhost:8080/example?email=test

You can get this error with multiple different commands for the same reason. The ‘?’ in the param to curl is interpreted as a substitution wildcard character. To avoid the issue, either escape the ? as \? or just wrap the whole url in double quotes.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.