From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8657 invoked by alias); 16 Aug 2015 16:43:47 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20415 Received: (qmail 17379 invoked from network); 16 Aug 2015 16:43:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE autolearn=ham autolearn_force=no version=3.4.0 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== X-Received: by 10.50.80.19 with SMTP id n19mr11445052igx.30.1439743423756; Sun, 16 Aug 2015 09:43:43 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1212377169.5264610.1439708089255.JavaMail.yahoo@mail.yahoo.com> References: <55D03155.6010606@gmx.com> <1212377169.5264610.1439708089255.JavaMail.yahoo@mail.yahoo.com> From: Gowtham M Date: Sun, 16 Aug 2015 22:13:24 +0530 Message-ID: Subject: Re: Errors with my youtube-dl function in ~/.zshrc but I am unsure why To: "zsh-users@zsh.org" Cc: John Content-Type: multipart/alternative; boundary=089e01494b6857471c051d7063c8 --089e01494b6857471c051d7063c8 Content-Type: text/plain; charset=UTF-8 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? > --089e01494b6857471c051d7063c8--