5

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

You need to escape the ? and = using backslashes:

youtube-dl https://www.youtube.com/watch\?v\=mkd6JkfI4yk
|improve this answer|||||
  • 1
    Thanks, this works, but why is this happening now? In bash it works fine. – Sebastian Semmler Sep 22 '16 at 19:11
  • 1
    @Sebastian I don't know — with my oh-my-zsh configuration, when I paste in the link it auto-escapes it for me. – grg Sep 23 '16 at 9:34
  • 1
    @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 at 18:58
0

Wrapping in quotes also works

youtube-dl "https://www.youtube.com/watch?v=mkd6JkfI4yk"
|improve this answer|||||

You must log in to answer this question.

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