Skip to content

Make internal->external protocol configurable #778

Closed

Description

@sophiajt

Eg) https://twitter.com/saulfp/status/1179595380352147457?s=19

It would be helpful to be able to configure how values are serialized from internal commands to external ones. Eg you may want to configure it to use json if you predominantly user json-parsing externals.

Activity

  1. saulpw commented on Oct 3, 2019

    @saulpw

    I don't know about the internals of nushell, but would it be straightforward to check the environment for something like NUTO=tsv?

    Also what is the ^echo $it for?

  2. andrasio commented on Oct 3, 2019

    @andrasio
    Member

    @jonathandturner Interesting.

    @saulpw please see escaping commands (for the echo case). $it holds the current item you are processing from input coming in.

  3. ajkerrigan commented on Oct 4, 2019

    @ajkerrigan

    This seems related to #412, but I can't tell if these are two separate concerns or just two pieces of the same question:

    • How do we send data directly from an internal command to the stdin of an external one?
    • How do we control the serialization/formatting along the way?

    For VisiData specifically, I was wondering if it'd be useful to have a plugin that would let you do this:

    <internal command that produces a table> | vd --format json

    As a replacement for:

    <internal command that produces a table> | to-json | ^echo $it | vd -f json

    But wasn't sure if that was a fundamentally broken/too narrow way to think about it.

  4. andrasio commented on Nov 2, 2019

    @andrasio
    Member
  5. added
    category:enhancement
    on Nov 2, 2019
  6. thegedge commented on Jan 6, 2020

    @thegedge
    Contributor

    Related idea: #451

  7. thegedge commented on Feb 23, 2020

    @thegedge
    Contributor

    Duplicate of #451

    I'm going to close this in favour of #451, which mentions configuring both input and output marshalling of externals. In other words, it's a superset of functionality.

  8. added a commit that references this issue on Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions