Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Multi-element zstat
- X-seq: zsh-users 27132
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Multi-element zstat
- Date: Thu, 23 Sep 2021 18:39:08 -0400
- Archived-at: <https://zsh.org/users/27132>
- In-reply-to: <20210922005142.GA4135@tarpaulin.shahaf.local2>
- List-id: <zsh-users.zsh.org>
- Openpgp: url=https://www.security.spodhuis.org/PGP/keys/keys-2013rsa-2020cv25519.asc
- References: <20210922005142.GA4135@tarpaulin.shahaf.local2>
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
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author