From: Stephane Chazelas <stephane@chazelas.org>
To: zsh-workers@zsh.org
Subject: Re: zsh/stat: output file birth time under Linux
Date: Mon, 14 Jun 2021 21:05:10 +0100 [thread overview]
Message-ID: <20210614200510.df26vewi4qro2vbd@chazelas.org> (raw)
In-Reply-To: <YMek63ecXS2A266/@fullerene.field.pennock-tech.net>
2021-06-14 14:50:19 -0400, Phil Pennock:
[...]
> I think the tricky decision is what to do about setting an numerically
> indexed array instead of printing or setting an associative array.
[...]
I agree. There's a risk users do things like:
zstat -nLA a -- *
printf 'File: %s\n dev: %s...\n target: %15$s\n' "$a[@]"
Or
while (( $#a )); do
print -r -- $a[1] $a[4] ...
shift 15 a
done
(though in practice those behave poorly when any of the
(l)stat()s fails, so users would be more likely to run zstat in
a loop).
Or:
zstat -LA s link
print -r target: $s[-1]
--
Stephane
prev parent reply other threads:[~2021-06-14 20:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-14 12:09 Vincent Lefevre
2021-06-14 12:17 ` Stephane Chazelas
2021-06-14 19:47 ` Stephane Chazelas
2021-06-14 18:50 ` Phil Pennock
2021-06-14 20:05 ` Stephane Chazelas [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=20210614200510.df26vewi4qro2vbd@chazelas.org \
--to=stephane@chazelas.org \
--cc=zsh-workers@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).