From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13486 invoked by alias); 24 Oct 2014 07:05:29 -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: 19280 Received: (qmail 22183 invoked from network); 24 Oct 2014 07:05:28 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW 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=nSWdS6if9K5AQETx/mhWwD1h7+t/PlDbwvqDL7vJqgk=; b=HWv3V/uh2v+JAMn2KEke/DmS/P7j0aEheF0aTQ/2uNy9DTNCq769XHDUq4QVZM6yod 4Xy3KUXi/N381FcwK+LDKxfyULnZur9q9jkYlk7PQGdFDGOEujEDaI3rwSYUcJ+SgGeT 8Gx3OfqZurarzPJlOQAn34pWk1TnanEj2OYNxD7XluQhjBnuLQ+pxZ0VCVEiLGS8HDvN eaqY4xV82bv1c6Aco17GI1p/eODs53yV9CpAXEVn4/umeYKn80GHqSTQK9d6lYqm1KBS Y43yFNHQQVS2uCVhdLqWHr0pt9oKAz+iW64IehE6bt5YNJ5QnOV3NSLLEpJ/tpUe6W+J VhWA== MIME-Version: 1.0 X-Received: by 10.170.164.213 with SMTP id g204mr1177020ykd.55.1414134323620; Fri, 24 Oct 2014 00:05:23 -0700 (PDT) In-Reply-To: <20141024062838.GB3496@localhost.localdomain> References: <20141024021406.GA3496@localhost.localdomain> <141023202253.ZM19726@torch.brasslantern.com> <20141024062838.GB3496@localhost.localdomain> Date: Fri, 24 Oct 2014 09:05:23 +0200 Message-ID: Subject: Re: (-) doesn't make (e) working on the files which symbolic links point to ? From: Mikael Magnusson To: Zsh Users Content-Type: text/plain; charset=UTF-8 On Fri, Oct 24, 2014 at 8:28 AM, Han Pingtian wrote: > On Thu, Oct 23, 2014 at 08:22:53PM -0700, Bart Schaefer wrote: >> On Oct 24, 10:14am, Han Pingtian wrote: >> } >> } Looks like the qualifer "(-)" doesn't make "(e)" works on files pointed >> } by symblic >> >> The only thing that (-) controls is whether the file attributes are read >> by lstat() or stat(). It does not cause a readlink(); note that even in >> the absence of (e), the names returned by *(@-) are the names of the links >> and not of the files linked-to. >> > > Thanks. > >> You want (:A) like so: >> >> ls -l /dev/disk/by-id/*(:Ae'.[[ $REPLY = *sda* ]].') > > I'm sorry, it doesn't work. The outputs of "*(:Ae'.[[ $REPLY = *sda* ]].')" > is the same as "*(:A)". > It would appear that :A causes the e to not execute at all, but in either case the end result would not be the desired one. The following works, if your zsh is new enough to allow globbing in this context. ls -l /dev/disk/by-id/*(e.'[[ $REPLY(#q:A) = *sda* ]]'.) -- Mikael Magnusson