From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-users@zsh.org
Subject: Multi-element zstat
Date: Wed, 22 Sep 2021 00:51:42 +0000 [thread overview]
Message-ID: <20210922005142.GA4135@tarpaulin.shahaf.local2> (raw)
> tt(zstat )[ tt(-gnNolLtTrs) ] [ tt(-f) var(fd) ] \
> [ tt(-H) var(hash) ] [ tt(-A) var(array) ] \
> [ tt(-F) var(fmt) ]
> [ tt(PLUS())var(element) ] [ var(file) ... ]
⋮
> A particular element may be selected by including its name
> preceded by a `tt(PLUS())' in the option list; only one element is allowed.
> The element may be shortened to any unique set of leading
> characters. Otherwise, all elements will be shown for all files.
How about extending the syntax to permit specifying multiple elements,
in which case only those will be shown? E.g., «zstat +uid:gid:mode
./foo» or «zstat +uid +gid +mode ./foo»? The latter syntax would
necessitate an incompatible change notice in NEWS/README (because «zstat
+mode +foo» does stat("+foo"), exactly as the docstring promises). The
output of the example invocation would be as follows (assuming -o is
also passed for sanity):
.
mode 0100644
uid 1000
gid 1000
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.
Cheers,
Daniel
next reply other threads:[~2021-09-22 0:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-22 0:51 Daniel Shahaf [this message]
2021-09-23 22:39 ` Phil Pennock
2021-09-26 6:54 ` Daniel Shahaf
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=20210922005142.GA4135@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--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).