Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f7a2e46

Browse files
authored
Merge pull request #5309 from epage/long
fix(complete): Don't provide help output for user
2 parents a04e455 + 6fcba98 commit f7a2e46

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

clap_complete/src/dynamic/shells/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use crate::dynamic::Completer as _;
1919
#[derive(clap::Subcommand)]
2020
#[allow(missing_docs)]
2121
#[derive(Clone, Debug)]
22+
#[command(about = None, long_about = None)]
2223
pub enum CompleteCommand {
2324
/// Register shell completions for this program
2425
#[command(hide = true)]
@@ -31,6 +32,7 @@ pub enum CompleteCommand {
3132
#[command(group = clap::ArgGroup::new("complete").multiple(true).conflicts_with("register"))]
3233
#[allow(missing_docs)]
3334
#[derive(Clone, Debug)]
35+
#[command(about = None, long_about = None)]
3436
pub struct CompleteArgs {
3537
/// Specify shell to complete for
3638
#[arg(long)]

clap_complete/tests/snapshots/home/static/exhaustive/elvish/elvish/rc.elv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ set edit:completion:arg-completer[exhaustive] = {|@words|
2222
&'exhaustive'= {
2323
cand --generate 'generate'
2424
cand --global 'everywhere'
25-
cand -h 'Print help (see more with ''--help'')'
26-
cand --help 'Print help (see more with ''--help'')'
25+
cand -h 'Print help'
26+
cand --help 'Print help'
2727
cand -V 'Print version'
2828
cand --version 'Print version'
2929
cand action 'action'

clap_complete/tests/snapshots/home/static/exhaustive/fish/fish/completions/exhaustive.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
complete -c exhaustive -n "__fish_use_subcommand" -l generate -d 'generate' -r -f -a "{bash '',elvish '',fish '',powershell '',zsh ''}"
22
complete -c exhaustive -n "__fish_use_subcommand" -l global -d 'everywhere'
3-
complete -c exhaustive -n "__fish_use_subcommand" -s h -l help -d 'Print help (see more with \'--help\')'
3+
complete -c exhaustive -n "__fish_use_subcommand" -s h -l help -d 'Print help'
44
complete -c exhaustive -n "__fish_use_subcommand" -s V -l version -d 'Print version'
55
complete -c exhaustive -n "__fish_use_subcommand" -f -a "action"
66
complete -c exhaustive -n "__fish_use_subcommand" -f -a "quote"

clap_complete/tests/snapshots/home/static/exhaustive/zsh/zsh/_exhaustive

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ _exhaustive() {
1717
_arguments "${_arguments_options[@]}" \
1818
'--generate=[generate]:SHELL:(bash elvish fish powershell zsh)' \
1919
'--global[everywhere]' \
20-
'-h[Print help (see more with '\''--help'\'')]' \
21-
'--help[Print help (see more with '\''--help'\'')]' \
20+
'-h[Print help]' \
21+
'--help[Print help]' \
2222
'-V[Print version]' \
2323
'--version[Print version]' \
2424
":: :_exhaustive_commands" \

0 commit comments

Comments
 (0)