Zsh says "no matches found" when trying to download video with youtube-dl

I downloaded youtube-dl using pip on CrunchBang (a Debian Wheezy distro). When I run

youtube-dl {video URL}

I get

zsh: no matches found: {video URL}

I guess it has something to do with zsh, because I found some users on Arch forums complaining about it. When I switched to bash it worked.


Try quoting the URL, e.g.

youtube-dl '{video URL}'

in your notation, to avoid possible interpretation of special characters in the string.


This was already mentioned in the comments, but it deserves its own answer:

autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic

autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic

This causes pasted URLs to be automatically quoted, without needing to disable globbing.

Place the above snippet in your ~/.zshrc file to persist this setting for future terminal sessions.


You can disable globbing for all commands with:

unsetopt nomatch

You can put it in ~/.zshrc.