Skip to content

Commit

Permalink
main [nfc]: Tweak formatting of CLI structs
Browse files Browse the repository at this point in the history
Giving these a bit more room to breathe makes them a bit easier
to read, I think.

Also fix a typo in an internal comment.
  • Loading branch information
gnprice committed Dec 11, 2022
1 parent 3ee1219 commit 6a41f2d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,34 @@ enum Args {
/// Output is JSON by default. With `--raw`/`-r`, if the data is a
/// string, print it directly. With `--output-toml`, print the data
/// as a fragment of TOML.
// Without verbatim_doc_comments, the paragraphs get rewrapped to like
// Without verbatim_doc_comment, the paragraphs get rewrapped to like
// 120 columns wide.
#[structopt(verbatim_doc_comment)]
Get {
/// Path to the TOML file to read
#[structopt(parse(from_os_str))]
path: PathBuf,

/// Query within the TOML data (e.g. `dependencies.serde`, `foo[0].bar`)
query: String,

#[structopt(flatten)]
opts: GetOpts,
},

/// Edit the file to set some data (currently, just print modified version)
Set {
/// Path to the TOML file to read
#[structopt(parse(from_os_str))]
path: PathBuf,

/// Query within the TOML data (e.g. `dependencies.serde`, `foo[0].bar`)
query: String,

/// String value to place at the given spot (bool, array, etc. are TODO)
value_str: String, // TODO more forms
},
//
// TODO: append/add (name TBD)
}

Expand Down

0 comments on commit 6a41f2d

Please sign in to comment.