|
|
|
|
|
by exyi
1327 days ago
|
|
nushell seems to have better way of parsing the string-only outputs of other commands. https://www.nushell.sh/book/commands/parse.html I don't know how to do a similar thing in powershell. > To me interesting question is that is it even possible to build rich strucure-aware shell-like cli environment that would allow seamless integration of external polyglot programs... Problem is that most of the classic Unix programs output in some messy format. It would be nice if we could agree that each command has --json flag (for example) which will make the output trivial to parse programmatically in any other advanced shell. |
|
That's part of the solution, but I think a signaling layer of sorts is needed too so that the reading side knows that the data is structured instead of just bytes. So basically instead of needing explicit
You could have From there it would then be easy to have env var or something instead of explicit cmdline flag to eventually end up with (almost) seamless