On 24/07/2021 20:26, Paul Eggert wrote:
On 7/24/21 10:48 AM, Vito Caputo wrote:
Couldn't we make
-0 and any aliases shorthand for a new --format=WORD where WORD is
names0 or something. That way it's automatically mutually exclusive
with the other formats?
It would make sense to invent a new --quoting-style='literal0' option
(by analogy with the existing --quoting-style='literal'), and make ls -0
an alias for ls --quoting-style='literal0'. I could add support for that
if there's interest.
It's one of those marginal ones I think,
but if you think it's warranted, that's cool.
I would use the more consistent option for this though, i.e.:
-z, --zero end each output line with NUL, not newline
We could document that -z implies:
--quoting-style=literal --show-control-chars --format=single-column
The --format=single-column implication is debatable.
I'm suggesting it as robust programmatic parsing of --format=long is
pretty much impossible, which is not obvious.
thanks,
Pádraig