From 6a41f2da04679ba29f944571915bdf183eb0eeec Mon Sep 17 00:00:00 2001 From: Greg Price Date: Fri, 9 Dec 2022 19:39:33 -0800 Subject: [PATCH] main [nfc]: Tweak formatting of CLI structs 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. --- src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 0ac9434..0f85a13 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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) }