You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo run --example completion-derive -- --generate=bash
Actual Behaviour
$ RUST_BACKTRACE=1 cargo run --example completion-derive -- --generate=bash
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `/home/alex/.cargo/target/debug/examples/completion-derive --generate=bash`
thread 'main' panicked at 'Command value_hints_derive: Short option names must be unique for each argument, but '-h' is in use by both 'host' and 'help' (call `cmd.disable_help_flag(true)` to remove the auto-generated `--help`)', src/builder/debug_asserts.rs:121:17
stack backtrace:
0: rust_begin_unwind
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
2: clap::builder::debug_asserts::assert_app
at /home/alex/project/clap/src/builder/debug_asserts.rs:121:17
3: clap::builder::command::Command::_build_self
at /home/alex/project/clap/src/builder/command.rs:3898:13
4: clap::builder::command::Command::_do_parse
at /home/alex/project/clap/src/builder/command.rs:3768:9
5: clap::builder::command::Command::try_get_matches_from_mut
at /home/alex/project/clap/src/builder/command.rs:708:9
6: clap::builder::command::Command::get_matches_from
at /home/alex/project/clap/src/builder/command.rs:578:9
7: clap::builder::command::Command::get_matches
at /home/alex/project/clap/src/builder/command.rs:490:9
8: clap::derive::Parser::parse
at /home/alex/project/clap/src/derive.rs:82:27
9: completion_derive::main
at ./examples/completion-derive.rs:62:15
10: core::ops::function::FnOnce::call_once
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5
Expected Behaviour
It should not panic.
No panics in release mode and the output seems to be correct too.
Additional Context
No response
Debug Output
[ clap::builder::command] Command::_do_parse
[ clap::builder::command] Command::_build: name="value_hints_derive"
[ clap::builder::command] Command::_propagate:value_hints_derive
[ clap::builder::command] Command::_check_help_and_version:value_hints_derive expand_help_tree=false
[ clap::builder::command] Command::long_help_exists
[ clap::builder::command] Command::_check_help_and_version: Building default --help
[ clap::builder::command] Command::_propagate_global_args:value_hints_derive
[clap::builder::debug_asserts] Command::_debug_asserts
[clap::builder::debug_asserts] Arg::_debug_asserts:generator
[clap::builder::debug_asserts] Arg::_debug_asserts:unknown
[clap::builder::debug_asserts] Arg::_debug_asserts:other
[clap::builder::debug_asserts] Arg::_debug_asserts:path
[clap::builder::debug_asserts] Arg::_debug_asserts:file
[clap::builder::debug_asserts] Arg::_debug_asserts:dir
[clap::builder::debug_asserts] Arg::_debug_asserts:exe
[clap::builder::debug_asserts] Arg::_debug_asserts:cmd_name
[clap::builder::debug_asserts] Arg::_debug_asserts:cmd
[clap::builder::debug_asserts] Arg::_debug_asserts:command_with_args
[clap::builder::debug_asserts] Arg::_debug_asserts:user
[clap::builder::debug_asserts] Arg::_debug_asserts:host
thread 'main' panicked at 'Command value_hints_derive: Short option names must be unique for each argument, but '-h' is in use by both 'host' and 'help' (call `cmd.disable_help_flag(true)` to remove the auto-generated `--help`)', src/builder/debug_asserts.rs:121:17
The text was updated successfully, but these errors were encountered:
Please complete the following tasks
Rust Version
rustc 1.64.0 (a55dd71d5 2022-09-19)
Clap Version
4.0.0
Minimal reproducible code
completion-derive example: https://github.com/clap-rs/clap/blob/master/clap_complete/examples/completion-derive.rs
Steps to reproduce the bug with the above code
Actual Behaviour
Expected Behaviour
It should not panic.
No panics in release mode and the output seems to be correct too.
Additional Context
No response
Debug Output
The text was updated successfully, but these errors were encountered: