4 ms·
>And if your tool already produces a standard format as output, like json or toml, you don’t even need those things. json or toml So already we have two (not o
by fuzztester 3y ago
>And if your tool already produces a standard format as output, like json or toml, you don’t even need those things.
json or toml
So already we have two (not one) formats that nushell presumably has to support? Or am I not getting something?
- steveklabnik 3y ago"like" is doing some work here. nushell supports: * 16 formats to convert from https://www.nushell.sh/commands/docs/from.html#subcommands https://www.nushell.sh/commands/docs/from.html#subcommands * 10 formats to convert to https://www.nushell.sh/commands/docs/to.html#subcommands https://www.nushell.sh/commands/docs/to.html#subcommands by default. I believe that via its plugin system, anyone can write a plugin to support whatever additional formats they want, but I haven't needed to investigate that deeply. And that's if you want to support a format specifically. You can do something similar to like, how you'd manipulate plaintext output on UNIX with other commands. For example, see this example for parsing the output of git log: https://www.nushell.sh/cookbook/parsing_git_log.html https://www.nushell.sh/cookbook/parsing_git_log.html the 'lines' command will take any text and produce a nu table, where each row is a line. At that point the data has been converted, no specific "git log" format needed.
- fuzztester 3y agoOkay. Sounds interesting, should check it out.