zsh: no matches found

It seems I have some zsh misconfiguration. I use youtube-dl regular to download videos. But since a few days, I get this error

youtube-dl https://www.youtube.com/watch?v=mkd6JkfI4yk
zsh: no matches found: https://www.youtube.com/watch?v=mkd6JkfI4yk

I did not change anything with my zsh configuration. Why do I get this error message and how can I make it work again?

FYI I don’t have oh-my-zsh installed.


Solution 1:

You need to escape the ? and = using backslashes:

youtube-dl https://www.youtube.com/watch\?v\=mkd6JkfI4yk

Solution 2:

Wrapping in quotes also works

youtube-dl "https://www.youtube.com/watch?v=mkd6JkfI4yk"