Not a direct answer, but youtube-dl works with the video id also, like: % yt OC1JiAUr3ZU You may also "setopt nonomatch" to make zsh leave the argument unchanged if no files match. Although, be warned that it might have some side effects. Hope this helps. - Gowtham On Sun, Aug 16, 2015 at 12:24 PM, John wrote: > > > > > ----- Original Message ----- > > From: Eric Cook > > To: zsh-users@zsh.org > > Cc: da_audiophile@yahoo.com > > Sent: Sunday, August 16, 2015 2:44 AM > > Subject: Re: Errors with my youtube-dl function in ~/.zshrc but I am > unsure why > > > > On 08/16/2015 02:32 AM, John wrote: > >> Why does zsh complain about no matches when I invoke my yt function > and how > > can I correct the code? Thanks! > >> > >> From ~/.zshrc: > >> yt() { [[ -z "$1" ]] || noglob youtube-dl -q "$1" > > &; } > >> > >> Output of command: > >> % yt https://www.youtube.com/watch?v=OC1JiAUr3ZU > > :( > >> zsh: no matches found: https://www.youtube.com/watch?v=OC1JiAUr3ZU > >> > >> Please note that I am not subscribed to the ML so please cc me in the > > reply. > >> > > You have to call the function with noglob to prevent zsh from thinking ? > is a > > pattern character. > > > > so: > > % noglob yt https://www.youtube.com/watch?v=OC1JiAUr3ZU > > > > Thank you for the reply. In the past (month ago), this function worked > as-is calling the command prefixed by noglob as you recommended. Is there > any way I can roll it into the function? >