Skip to content

Conversation

adrian-kong
Copy link
Contributor

Description

--input and --output parameters to rust sbp2json, json2json, json2sbp

JIRA Reference

https://swift-nav.atlassian.net/browse/DEVINFRA-738

@adrian-kong adrian-kong requested a review from notoriaga as a code owner May 10, 2022 02:57
@adrian-kong adrian-kong force-pushed the adrian/sbp2json-with-input branch 3 times, most recently from 20499d1 to fe6f31d Compare May 10, 2022 03:00
@adrian-kong adrian-kong force-pushed the adrian/sbp2json-with-input branch from fe6f31d to e3f5fd4 Compare May 10, 2022 22:41
@adrian-kong
Copy link
Contributor Author

is there a way to make clap do without the -- parameter? i just saw the comment on the ticket, would it have to instead use std::env::args hmm

@notoriaga
Copy link
Contributor

is there a way to make clap do without the -- parameter? i just saw the comment on the ticket, would it have to instead use std::env::args hmm

yeah if you don't specify long/short it should be a positional argument instead of a flag

@adrian-kong adrian-kong force-pushed the adrian/sbp2json-with-input branch from e3f5fd4 to 0bdffec Compare May 10, 2022 23:56
@adrian-kong adrian-kong requested a review from notoriaga May 10, 2022 23:56
@adrian-kong adrian-kong force-pushed the adrian/sbp2json-with-input branch from 0bdffec to 7f56c4c Compare May 11, 2022 01:07
@adrian-kong adrian-kong merged commit ac30595 into master May 11, 2022
@adrian-kong adrian-kong deleted the adrian/sbp2json-with-input branch May 11, 2022 02:08
///
/// Typical usage:
///
/// json2json --input [PATH] --output [PATH]
Copy link
Contributor

@silverjam silverjam May 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update these example usage strings since we're not using option args (using positional args instead), example:

json2json [<INPUT> [<OUTPUT>]]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does --help show if we remove that completely? I feel like that's pretty similar to what clap will generate anyway

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably better to just remove this

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.

3 participants