We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc 1.71.1 (eb26296b5 2023-08-03)
4.3.23
use clap::{Parser, Subcommand, Args}; #[derive(Debug, Args)] #[command(help_template = "{all-args}")] pub struct Param { } #[derive(Debug, Subcommand)] #[command(help_template = "{all-args}", disable_help_subcommand=true)] enum SubCommands { #[command(name = "test1", alias = "t1", about = "command1")] Test1(Param), #[command(name = "test2", alias = "t2", about = "command2")] Test2(Param), #[command(name = "test3", alias = "t3", about = "command3")] Test3(Param), } #[derive(Debug, Parser)] #[command(help_template = "{subcommands}")] struct Cmd { #[command(subcommand)] command: SubCommands, } fn main() { let parsed = Cmd::parse(); println!("{parsed:#?}"); }
cargo run
test1 command1 test2 command2 test3 command3
No response
[clap_builder::builder::command]Command::_do_parse [clap_builder::builder::command]Command::_build: name="testcode" [clap_builder::builder::command]Command::_propagate:testcode [clap_builder::builder::command]Command::_check_help_and_version:testcode expand_help_tree=false [clap_builder::builder::command]Command::long_help_exists [clap_builder::builder::command]Command::_check_help_and_version: Building default --help [clap_builder::builder::command]Command::_propagate_global_args:testcode [clap_builder::builder::debug_asserts]Command::_debug_asserts [clap_builder::builder::debug_asserts]Arg::_debug_asserts:help [clap_builder::builder::debug_asserts]Command::_verify_positionals [clap_builder::parser::parser]Parser::get_matches_with [clap_builder::parser::parser]Parser::add_defaults [clap_builder::parser::parser]Parser::add_defaults:iter:help: [clap_builder::parser::parser]Parser::add_default_value: doesn't have conditional defaults [clap_builder::parser::parser]Parser::add_default_value:iter:help: doesn't have default vals [clap_builder::parser::validator]Validator::validate [clap_builder::builder::command]Command::write_help_err: testcode, use_long=false [ clap_builder::output::help]write_help [clap_builder::output::help_template]HelpTemplate::new cmd=testcode, use_long=false [clap_builder::output::help_template]HelpTemplate::write_templated_help [clap_builder::output::help_template]HelpTemplate::write_subcommands [clap_builder::output::help_template]HelpTemplate::write_subcommands longest = 5 [clap_builder::output::help_template]HelpTemplate::sc_spec_vals: a=test1 [clap_builder::output::help_template]HelpTemplate::sc_spec_vals: a=test2 [clap_builder::output::help_template]HelpTemplate::sc_spec_vals: a=test3 [clap_builder::output::help_template]HelpTemplate::write_subcommand [clap_builder::output::help_template]HelpTemplate::sc_spec_vals: a=test1 [clap_builder::output::help_template]HelpTemplate::help [clap_builder::output::help_template]HelpTemplate::help: help_width=13, spaces=8, avail=87 [clap_builder::output::help_template]HelpTemplate::write_subcommand [clap_builder::output::help_template]HelpTemplate::sc_spec_vals: a=test2 [clap_builder::output::help_template]HelpTemplate::help [clap_builder::output::help_template]HelpTemplate::help: help_width=13, spaces=8, avail=87 [clap_builder::output::help_template]HelpTemplate::write_subcommand [clap_builder::output::help_template]HelpTemplate::sc_spec_vals: a=test3 [clap_builder::output::help_template]HelpTemplate::help [clap_builder::output::help_template]HelpTemplate::help: help_width=13, spaces=8, avail=87 [clap_builder::builder::command]Command::color: Color setting... [clap_builder::builder::command]Command::color: Color setting... test1 command1 test2 command2 test3 command3
The text was updated successfully, but these errors were encountered:
fix(help): Ensure padding isn't stripped
e1ac01a
Fixes clap-rs#5083
bf3f25e
Successfully merging a pull request may close this issue.
Please complete the following tasks
Rust Version
rustc 1.71.1 (eb26296b5 2023-08-03)
Clap Version
4.3.23
Minimal reproducible code
Steps to reproduce the bug with the above code
cargo run
Actual Behaviour
Expected Behaviour
Additional Context
No response
Debug Output
The text was updated successfully, but these errors were encountered: