Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add entry for jc #18

Merged
merged 2 commits into from
May 16, 2023
Merged

add entry for jc #18

merged 2 commits into from
May 16, 2023

Conversation

er2
Copy link
Contributor

@er2 er2 commented Apr 8, 2023

In nushell, core commands like ls output structured data. But there's a world of unix commands that spit out plain text and often bespoke output formats.

jc parses these and converts them to json. For example

> dig | jc --dig | from json                                                                                                                                                   04/08/2023 03:20:05 PM
╭───┬───────┬────────┬─────────┬─────────────┬───────────┬────────────┬──────────────┬──────────────┬──────────────┬──────────────┬──────────────┬────────────┬──────────────┬──────────────┬──────┬────────────┬──────────────╮
 #   id    opcode  status      flags     query_num  answer_num  authority_nu  additional_n  opt_pseudose    question       answer     query_time     server         when      rcvd  when_epoch  when_epoch_u 
                                                                m             um            ction                                                                                               tc           
├───┼───────┼────────┼─────────┼─────────────┼───────────┼────────────┼──────────────┼──────────────┼──────────────┼──────────────┼──────────────┼────────────┼──────────────┼──────────────┼──────┼────────────┼──────────────┤
 0  62939  QUERY   NOERROR  [list 3              1          13             0             1  {record 1     {record 3     [table 13              0  127.0.0.53#5  Sat Apr 08     239  1680981605               
                            items]                                                          field}        fields}       rows]                     3(127.0.0.53  15:20:05 EDT                                 
                                                                                                                                                  ) (UDP)        2023                                        
╰───┴───────┴────────┴─────────┴─────────────┴───────────┴────────────┴──────────────┴──────────────┴──────────────┴──────────────┴──────────────┴────────────┴──────────────┴──────────────┴──────┴────────────┴──────────────╯

@fdncred
Copy link
Collaborator

fdncred commented Apr 8, 2023

I'll have to think about this one. I'm not sure I'd call jc and integration since it's just spitting out json for anyone to consume.

@fdncred
Copy link
Collaborator

fdncred commented May 16, 2023

Might as well. Thanks.

@fdncred fdncred merged commit 4d1ad59 into nushell:main May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants