Skip to content

Commit 5e32dd4

Browse files
committed
Bump version to 0.2.1 - fix --help formatting
Use clap's verbatim_doc_comment so the doc comment on Args is preserved verbatim in --help output. Without it, clap fold-wraps multiple lines into a single paragraph and strips indentation, mangling the example section.
1 parent 22c6529 commit 5e32dd4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sumcol"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66
description = "A command-line tool to sum a column of numbers."

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ enum Radix {
1818
/// Sum a column of numbers from text input.
1919
///
2020
/// Examples:
21-
/// ls -l | sumcol -f 5
22-
/// sumcol -f 3 -d : /etc/passwd
21+
/// ls -l | sumcol -f5
22+
///
2323
#[derive(Parser, Debug)]
24-
#[command(version, about)]
24+
#[command(version, verbatim_doc_comment)]
2525
struct Args {
2626
/// The field to sum. If not specified, uses the full line.
2727
#[arg(long, short, default_value("0"))]

0 commit comments

Comments
 (0)