zsh-users
 help / color / mirror / code / Atom feed
* Multi-element zstat
@ 2021-09-22  0:51 Daniel Shahaf
  2021-09-23 22:39 ` Phil Pennock
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Shahaf @ 2021-09-22  0:51 UTC (permalink / raw)
  To: zsh-users

> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-26  6:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22  0:51 Multi-element zstat Daniel Shahaf
2021-09-23 22:39 ` Phil Pennock
2021-09-26  6:54   ` Daniel Shahaf

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).