From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9580 invoked by alias); 28 Oct 2015 13:27:42 -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: 20840 Received: (qmail 9927 invoked from network); 28 Oct 2015 13:27:41 -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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID 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:date:message-id:subject:from:to :content-type; bh=bOHpx5uaO3tfmWQ+EqQYh6SvZ6yTYV6nDuJ7Ct8MJNs=; b=roIZ1Z1a5pYIsSKItwRFu7+r5C7N14XVvXmnFHYM1QbIzzgTKomOAZnBIz7FwQL+0r ODKhM6IYuG/8FPSFVkl6UZEOZbNDFi0bZ7UdWXnOJHw+iQlP44SCYHxJlDXC36MH//XO gxUZUy+7MvkNQrooTSX8N+6lfkC5Cj1U+beU/5NkO8IEkaBSHp4ciRt/EgH60NvaKi6M 05VJTMG6JymzJ93bzj0UqCh+HQGKU5pKPFmhCuIK1oz4m0hIU1EIqnv1hYlmH8Z6hK8q m52mbMIJI2ggTlPheb3HH55+UTpvt3Ns0BJyqr8ZpCPxfMky43y2JI4se7Q1TiTzMXhf 1ifg== MIME-Version: 1.0 X-Received: by 10.140.109.74 with SMTP id k68mr58745846qgf.77.1446038858447; Wed, 28 Oct 2015 06:27:38 -0700 (PDT) In-Reply-To: <20151028065702.GA8236@linux.vnet.ibm.com> References: <20151028065702.GA8236@linux.vnet.ibm.com> Date: Wed, 28 Oct 2015 14:27:38 +0100 Message-ID: Subject: Re: Recursive globbing shorthand (a la **.c) From: Mikael Magnusson To: vogt@linux.vnet.ibm.com, Zsh Users Content-Type: text/plain; charset=UTF-8 On Wed, Oct 28, 2015 at 7:57 AM, Dominik Vogt wrote: > Most of the time, I use recursive globbing to find files of > certain types, e.g. > > $ ll **/*.c > > With the zsh here (4.3.17), recursive globbing works only > with a plain ** anyway (i.e. in "**x" and "x**" the ** works just > like a plain "*"). So, is it possible (or a useful future > feature) to make "**" imply a trailing "/*" if not with a trailing > pattern? Then we could type > > $ ll **.c > > as a shorthand, and the "traditional" uses would work without > change (e.g. **/*.c or **/foo). > > (Note that on German keyboards, "/" and "*" are very awkward to > type in a sequence because both need the left shift key held and > the keys for the right hand are very far apart, so this is really > a usability issue.) If this is something you do often, you can do alias -g '**.c=**/*.c' I don't think it's useful to implement generally though, there's no particular reason to assume the pattern following the **/ should start with a * -- Mikael Magnusson