3 ms·
What I find weird about Powershell is that there's no "fixed-width column" parser, which is a widely used format for Unix-style CLI tools. I don't know if NuSh
by nerdponx 3y ago
What I find weird about Powershell is that there's no "fixed-width column" parser, which is a widely used format for Unix-style CLI tools.
I don't know if NuShell has it, I haven't tried.
In any case, it's much better for tools to output more-parseable data in the first place. Whitespace-delimited columns are fine of course, but not so much when the data can contain whitespace, as in the output from `ps`.
I don't see much reason why JSONLines (https://jsonlines.org/ https://jsonlines.org/) / NDJSON (https://ndjson.org/ https://ndjson.org/) can't be a standard output format from most tools, in addition to tables.
As for the reason of removal:
any language that can interact with json output can use readdir(3) and stat(2).
Ugh. Any language of course can do it. But that's basically telling users that they need to reimplement ls(1) themselves if they want to use any of its output and features in scripts.
I understand if the maintenance burden is too high to put it in ls(1) itself, but it's a shame that no tool currently does this. The closest we have is a feature request in Eza: https://github.com/eza-community/eza/issues/472 https://github.com/eza-community/eza/issues/472