Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Errors with my youtube-dl function in ~/.zshrc but I am unsure why
- X-seq: zsh-users 20415
- From: Gowtham M <gowthamgowtham@xxxxxxxxx>
- To: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: Re: Errors with my youtube-dl function in ~/.zshrc but I am unsure why
- Date: Sun, 16 Aug 2015 22:13:24 +0530
- Cc: John <da_audiophile@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=swM138Oih+P1p2w/NbCQWHkApM9C5vSGVi6jPytAOEw=; b=HTZUXqoh9EDP5Smr9qyyYwNQZ5PTZCbY1lro+MZlT2akz4ZPoda7mj6K3aC7ULos4B iUoUq4hp6AgH6S4/UwTAevZxZ9LZc9lqXdr7VhIn+L91lMnnBKmTQZofreUCGfKXUoqX m76gOG3jGd4ZWFpvmKnnghga+aaEgi7rv24NLi0VEMdGr0C7YZKgR4JUmSKk4amgbWvZ jeOh1qsTP7mmrILlvynQB/w07K7hRcenZ5v/GIz3kya2cmHhzXGhow90CdzNPmcdabhP qV+z+q6jju+1HtwZyF9eSyjiIAtTdP6dSbpWBTHsFqKmIEkjaQxCG4PUvE0PrjlmKZgY h8TA==
- In-reply-to: <1212377169.5264610.1439708089255.JavaMail.yahoo@mail.yahoo.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <55D03155.6010606@gmx.com> <1212377169.5264610.1439708089255.JavaMail.yahoo@mail.yahoo.com>
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 <da_audiophile@xxxxxxxxx> wrote:
>
>
>
>
> ----- Original Message -----
> > From: Eric Cook <llua@xxxxxxx>
> > To: zsh-users@xxxxxxx
> > Cc: da_audiophile@xxxxxxxxx
> > 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?
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author