Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Multi-element zstat



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