78

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.

slhck
  • 235,242
Lynob
  • 5,550
  • 23
  • 66
  • 96

3 Answers3

153

Try quoting the URL, e.g.

youtube-dl '{video URL}'

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

19

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.

6

You can disable globbing for all commands with:

unsetopt nomatch

You can put it in ~/.zshrc.