7

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.

2 Answers 2

6

You need to escape the ? and = using backslashes:

youtube-dl https://www.youtube.com/watch\?v\=mkd6JkfI4yk
2
  • 1
    Thanks, this works, but why is this happening now? In bash it works fine. Sep 22, 2016 at 19:11
  • 3
    @SebastianSemmler ? is a globbing pattern for any one character. In Bash, if no matching files are found, the ? is treated as a literal ? character, whereas in ZSH, no such exception is made. Thus, e.g. if we create the file test-x.txt, then echo test-?.txt will output test-x.txt in both Bash and ZSH, but if we delete the file, then Bash outputs test-?.txt, whereas ZSH complains that it can't find any files with matching names: no matches found.
    – Jivan Pal
    Jan 26, 2020 at 18:58
4

Wrapping in quotes also works

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .