Skip to content

from <format> commands (make <format> a subcommand of from) #955

Closed

Description

@thomasheartman

Is your feature request related to a problem? Please describe.
I wouldn't call it a problem as much as a quality of life-issue. When using the various from-x commands, the hyphen takes more work to type than a space.

Describe the solution you'd like
I'd like to be able to use the various formats as subcommands of a general from command, so that I could drop the hyphen. E.g.:
open file | from csv --headerless , fetch url | from json, etc.

The various subcommands would take their regular args as per usual.

Describe alternatives you've considered
N/A.

Activity

  1. sophiajt commented on Nov 12, 2019

    @sophiajt
    Contributor

    👍

    I definitely think we should consolidate them into one command and make the different ones add a subcommand to the main command.

    One possibility - we could piggyback on the new parse command. This would give you a verb to work from. Same idea:

    open file | parse csv --headerless , fetch url
    

    The current parse command could be another subcommand:

    open file | parse string "{key} = {value}"
    
  2. thomasheartman commented on Nov 20, 2019

    @thomasheartman
    Author

    Hmm, interesting. How does the parse command work? I can't find any clear docs for it, and I'm not sure where to find any describing tests. A quick grep didn't give me much.

    But anyway, yeah, that sounds like a good idea to me!

  3. jzaefferer commented on May 4, 2020

    @jzaefferer
    Contributor

    I think this is actually fixed by #1708 - as suggested, not using parse.

    parse is still missing docs, and the built-in help help parse doesn't explain enough.

  4. thegedge commented on May 5, 2020

    @thegedge
    Contributor

    Yep, agreed this issue itself has been closed (and thank you, @jzaefferer for taking care of the documentation! ❤️).

    I'll add an issue to document the parse command.

  5. added
    category:enhancement
    on May 5, 2020
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