From ad6751c33cdc2b4d00df6bb3ed3fb1160e1b87ed Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Fri, 25 Aug 2023 15:04:40 -0400 Subject: [PATCH 1/3] SM-774: Write help text to stderr on no args --- crates/bws/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bws/src/main.rs b/crates/bws/src/main.rs index 72c3b2afb..13e272b91 100644 --- a/crates/bws/src/main.rs +++ b/crates/bws/src/main.rs @@ -246,7 +246,7 @@ async fn process_commands() -> Result<()> { let Some(command) = cli.command else { let mut cmd = Cli::command(); - cmd.print_help()?; + eprintln!("{}", cmd.render_help()); return Ok(()); }; From 5b08cfd1863ac23b925ecc1554c94b36dcb29068 Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Mon, 28 Aug 2023 11:49:08 -0400 Subject: [PATCH 2/3] SM-774: Add styling to output change --- crates/bws/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bws/src/main.rs b/crates/bws/src/main.rs index ff1cee265..5e6da19d8 100644 --- a/crates/bws/src/main.rs +++ b/crates/bws/src/main.rs @@ -246,7 +246,7 @@ async fn process_commands() -> Result<()> { let Some(command) = cli.command else { let mut cmd = Cli::command(); - eprintln!("{}", cmd.render_help()); + eprintln!("{}", cmd.render_help().ansi()); return Ok(()); }; From 669db028fcbb99fc899ae98961933c8714dccbe5 Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Mon, 28 Aug 2023 11:58:39 -0400 Subject: [PATCH 3/3] SM-774: Update the changelog --- crates/bws/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/bws/CHANGELOG.md b/crates/bws/CHANGELOG.md index 65568c6c2..a0a16f745 100644 --- a/crates/bws/CHANGELOG.md +++ b/crates/bws/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Support for shell autocompletion with the `bws completions` command (#103) +- When running `bws` with no args, the help text is now printed to `stderr` instead of `stdout` to be consistent with `bws subcommand` behavior (#190) ## [0.3.0] - 2023-07-26