zsh-users
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: (-) doesn't make (e) working on the files which symbolic links point to ?
Date: Fri, 24 Oct 2014 09:05:23 +0200	[thread overview]
Message-ID: <CAHYJk3QkvDpH3_c73gN3yzt+UBNewrBFRrPa_apdFX+hpQui2A@mail.gmail.com> (raw)
In-Reply-To: <20141024062838.GB3496@localhost.localdomain>

On Fri, Oct 24, 2014 at 8:28 AM, Han Pingtian <hanpt@linux.vnet.ibm.com> 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


  reply	other threads:[~2014-10-24  7:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-24  2:14 Han Pingtian
2014-10-24  3:22 ` Bart Schaefer
2014-10-24  6:28   ` Han Pingtian
2014-10-24  7:05     ` Mikael Magnusson [this message]
2014-10-24  8:56       ` Han Pingtian
2014-10-24  7:19     ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHYJk3QkvDpH3_c73gN3yzt+UBNewrBFRrPa_apdFX+hpQui2A@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).