From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24769 invoked by alias); 15 May 2014 09:36:02 -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: 18814 Received: (qmail 8452 invoked from network); 15 May 2014 09:35:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=mesmtp; bh= QWXVCNko3D3AnE3z8F/aapNohqA=; b=xqp1IQtKpCw7kEbx7+jzND/sB50Wl4Y4 LSFg1/mva/ZC4VfCDtwIyHNPNKoxK5ujWDJf1IYmwJ6zPFummPoR4e0VPT9FZY1h Fd5w3gJE4kj9287gn7gPT03Iuisi6hVLt6+/avv08WY9Czn7nntPh+Z5zvnTeYFo Ek/vQs/Jads= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=smtpout; bh=QWXVCNko3D3AnE3z8F/aapNohqA=; b=lBOy29aCVpjlQnKb0Tli56yrg9uZ mgFL0yxp0ojNRngUZ0/C+QWbzoUNrm0xl/RNiCRjXSmihWVl9G9o4rkR1v/YJR0i gar5+ynJ8JfIEWClPnKjCilGNOcWClreo/Y5/njkTkEGRQPvoyUqnqzi1kQyQsEy Ex699KRuzy40c2U= X-Sasl-enc: ztNUDrsuXAIP4iLt7HNovYZ9cRkfOKG+aAeoZz8IoTYJ 1400146551 Date: Thu, 15 May 2014 09:35:47 +0000 From: Daniel Shahaf To: Bart Schaefer Cc: zsh-users@zsh.org Subject: Re: globbing in conditional expressions Message-ID: <20140515093547.GD2174@tarsus.local2> References: <20140507124101.GA53652@isis.sigpipe.cz> <20140507154407.660eb500@pwslap01u.europe.root.pri> <20140508105522.GE2052@tarsus.local2> <20140508122045.3c68c3fa@pwslap01u.europe.root.pri> <140508083418.ZM14713@torch.brasslantern.com> <20140508201936.GB53652@isis.sigpipe.cz> <140513084117.ZM22925@torch.brasslantern.com> <20140514041908.GF2471@tarsus.local2> <140514001819.ZM23478@torch.brasslantern.com> <140514215557.ZM26660@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <140514215557.ZM26660@torch.brasslantern.com> User-Agent: Mutt/1.5.21 (2010-09-15) Bart Schaefer wrote on Wed, May 14, 2014 at 21:55:57 -0700: > On May 14, 12:18am, Bart Schaefer wrote: > } to use [ -m ... ] anyway because the glob pattern would expand before > } the call to the test builtin. > > Playing with this, I find that you can quote the pattern [ -m 'pat' ]. > However, quoting the pattern in [[ -m 'pat' ]] does not have the > expected effect -- a glob is performed even though the pattern was > quoted, so there's no way to make ? * [ ] match literally. Perhaps > not a show-stopper. > > } check path searches like **/zero* and whether glob flags work right? > > I tried this and it appears glob patterns confuse things: ... > So, still a few issues to iron out. Indeed. Thanks for taking the time to test drive this. I don't have much time for this; if I make progress I'll post a new iteration to the list, but in the meantime, perhaps someone else interested in the patch could pick it up and make a new version. Cheers, Daniel