From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14202 invoked by alias); 7 May 2014 14:57:30 -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: 18784 Received: (qmail 12441 invoked from network); 7 May 2014 14:57:26 -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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 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=qgv/9KU7Bu249qWvHI/5MYiBSv5FUozLLeTaHNZQJFY=; b=XwUh3Y4By0tyAsMlRIun7eY+vZqp4O0H6gPSIvEY5gVhB1DsypeTeH3HN+mTHR0yWh apWp8oBdj0vxrMS/QAKu4Y6llS6j4VpWgtjx7XGZRA10GD9EZ1SFyqPNvSpg03cBJkl+ s3Sm5wrnfVXMWKFO7M/xyxO71JFVqfhmpfx+CuffAyv96Iryj92Qpx9mJoBQgmerM1x9 3ddAEV2yl7ZnSC0QvRQ4EpwEgan2xNKBbS38NSh+7x9bOUpPN0qGmSfoC5bBGx9Av4k2 5Hgi+Oq/vzaoHSMcj4JxlakmvMKN7qR3iFCDsg7nR/OOonaRx+80lbWuH/VS4yKeKjnZ JDWg== MIME-Version: 1.0 X-Received: by 10.140.29.34 with SMTP id a31mr59899488qga.95.1399474641974; Wed, 07 May 2014 07:57:21 -0700 (PDT) In-Reply-To: <20140507124101.GA53652@isis.sigpipe.cz> References: <20140507124101.GA53652@isis.sigpipe.cz> Date: Wed, 7 May 2014 16:57:21 +0200 Message-ID: Subject: Re: globbing in conditional expressions From: Mikael Magnusson To: Zsh Users Content-Type: text/plain; charset=UTF-8 On 7 May 2014 14:41, Roman Neuhauser wrote: > hello, > > i was hoping i could combine conditional expressions with > some globbing, but i'm struggling to find the proper syntax. > > : 0 > ls fubar > snafu > : 0 > f=fubar(/F) > : 0 > echo $f > fubar(/F) > : 0 > echo $~f > fubar > : 0 > (set -x; [[ -z $~f ]]) > +zsh:183> [[ -z 'fubar(/F)' ]] > : 1 > > > i'm sure this is possible and documented, and i've just failed > to put the pieces together. a=( myglob*(/FN[1]) ) (( $#a )) && yay files -- Mikael Magnusson