zsh-users
 help / color / mirror / code / Atom feed
From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: "Phil Pennock" <zsh-workers+phil.pennock@spodhuis.org>,
	zsh-users@zsh.org
Subject: Re: Multi-element zstat
Date: Sun, 26 Sep 2021 06:54:19 +0000	[thread overview]
Message-ID: <ba0081a5-b4fe-4a0d-a211-4fa8023cb1fa@www.fastmail.com> (raw)
In-Reply-To: <YU0CDH91a657L500@hill.local>

Phil Pennock wrote on Thu, 23 Sep 2021 22:39 +00:00:
> On 2021-09-22 at 00:51 +0000, Daniel Shahaf wrote:
>> How about extending the syntax to permit specifying multiple elements,
>> in which case only those will be shown?
>
>> Looping over the one-element syntax isn't convenient when multiple file
>> targets are passed.  Ditto grepping the output.
>> 
>> Just looking for consensus on the direction at this point; not planning
>> to implement this immediately.
>
> No objection, but since you only list two of the approaches, have you
> considered whether or not using the -H option will suit your needs?
>
> for F in *(D.); do
>   zstat -nH st -- "$F"
>   print "$st[mode] $st[uid] $st[gid] $st[name]"
> done

I haven't.  Thanks.  It certainly beats both of the workarounds
I came up with.  Adding the syntactic sugar might still have value; I'll
see what I think the next time I run into this in my day-to-day uses.

Thanks again.

Daniel


      reply	other threads:[~2021-09-26  6:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22  0:51 Daniel Shahaf
2021-09-23 22:39 ` Phil Pennock
2021-09-26  6:54   ` Daniel Shahaf [this message]

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=ba0081a5-b4fe-4a0d-a211-4fa8023cb1fa@www.fastmail.com \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-users@zsh.org \
    --cc=zsh-workers+phil.pennock@spodhuis.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).