Showing preview only (3,436K chars total). Download the full file or copy to clipboard to get everything.
Repository: clap-rs/clap
Branch: master
Commit: 70f3bb31874f
Files: 597
Total size: 3.2 MB
Directory structure:
gitextract_6cj3b3in/
├── .cargo/
│ └── config.toml
├── .clippy.toml
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ ├── config.yml
│ │ └── feature_request.yml
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── renovate.json5
│ ├── settings.yml
│ └── workflows/
│ ├── audit.yml
│ ├── bench-baseline.yml
│ ├── ci.yml
│ ├── committed.yml
│ ├── post-release.yml
│ ├── pre-commit.yml
│ ├── release-notes.py
│ ├── rust-next.yml
│ ├── spelling.yml
│ └── template.yml
├── .gitignore
├── .pre-commit-config.yaml
├── CHANGELOG.md
├── CITATION.cff
├── CONTRIBUTING.md
├── Cargo.toml
├── LICENSE-APACHE
├── LICENSE-MIT
├── Makefile
├── README.md
├── clap_bench/
│ ├── Cargo.toml
│ ├── benches/
│ │ ├── complex.rs
│ │ ├── empty.rs
│ │ ├── ripgrep.rs
│ │ ├── rustup.rs
│ │ └── simple.rs
│ └── src/
│ └── lib.rs
├── clap_builder/
│ ├── CONTRIBUTING.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── builder/
│ │ ├── action.rs
│ │ ├── app_settings.rs
│ │ ├── arg.rs
│ │ ├── arg_group.rs
│ │ ├── arg_predicate.rs
│ │ ├── arg_settings.rs
│ │ ├── command.rs
│ │ ├── debug_asserts.rs
│ │ ├── ext.rs
│ │ ├── mod.rs
│ │ ├── os_str.rs
│ │ ├── possible_value.rs
│ │ ├── range.rs
│ │ ├── resettable.rs
│ │ ├── str.rs
│ │ ├── styled_str.rs
│ │ ├── styling.rs
│ │ ├── tests.rs
│ │ ├── value_hint.rs
│ │ └── value_parser.rs
│ ├── derive.rs
│ ├── error/
│ │ ├── context.rs
│ │ ├── format.rs
│ │ ├── kind.rs
│ │ └── mod.rs
│ ├── lib.rs
│ ├── macros.rs
│ ├── mkeymap.rs
│ ├── output/
│ │ ├── fmt.rs
│ │ ├── help.rs
│ │ ├── help_template.rs
│ │ ├── mod.rs
│ │ ├── textwrap/
│ │ │ ├── core.rs
│ │ │ ├── mod.rs
│ │ │ ├── word_separators.rs
│ │ │ └── wrap_algorithms.rs
│ │ └── usage.rs
│ ├── parser/
│ │ ├── arg_matcher.rs
│ │ ├── error.rs
│ │ ├── features/
│ │ │ ├── mod.rs
│ │ │ └── suggestions.rs
│ │ ├── matches/
│ │ │ ├── arg_matches.rs
│ │ │ ├── matched_arg.rs
│ │ │ ├── mod.rs
│ │ │ └── value_source.rs
│ │ ├── mod.rs
│ │ ├── parser.rs
│ │ └── validator.rs
│ └── util/
│ ├── any_value.rs
│ ├── color.rs
│ ├── escape.rs
│ ├── flat_map.rs
│ ├── flat_set.rs
│ ├── graph.rs
│ ├── id.rs
│ ├── mod.rs
│ └── str_to_bool.rs
├── clap_complete/
│ ├── CHANGELOG.md
│ ├── CONTRIBUTING.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── examples/
│ │ ├── completion-derive.rs
│ │ ├── completion.rs
│ │ ├── dynamic.rs
│ │ └── exhaustive.rs
│ ├── src/
│ │ ├── aot/
│ │ │ ├── generator/
│ │ │ │ ├── mod.rs
│ │ │ │ └── utils.rs
│ │ │ ├── mod.rs
│ │ │ └── shells/
│ │ │ ├── bash.rs
│ │ │ ├── elvish.rs
│ │ │ ├── fish.rs
│ │ │ ├── mod.rs
│ │ │ ├── powershell.rs
│ │ │ ├── shell.rs
│ │ │ └── zsh.rs
│ │ ├── engine/
│ │ │ ├── candidate.rs
│ │ │ ├── complete.rs
│ │ │ ├── custom.rs
│ │ │ └── mod.rs
│ │ ├── env/
│ │ │ ├── mod.rs
│ │ │ └── shells.rs
│ │ ├── lib.rs
│ │ └── macros.rs
│ └── tests/
│ ├── examples.rs
│ ├── snapshots/
│ │ ├── aliases.bash
│ │ ├── aliases.elvish
│ │ ├── aliases.fish
│ │ ├── aliases.ps1
│ │ ├── aliases.zsh
│ │ ├── basic.bash
│ │ ├── basic.elvish
│ │ ├── basic.fish
│ │ ├── basic.ps1
│ │ ├── basic.zsh
│ │ ├── custom_bin_name.bash
│ │ ├── custom_bin_name.elvish
│ │ ├── custom_bin_name.fish
│ │ ├── custom_bin_name.ps1
│ │ ├── custom_bin_name.zsh
│ │ ├── external_subcommands.bash
│ │ ├── external_subcommands.elvish
│ │ ├── external_subcommands.fish
│ │ ├── external_subcommands.ps1
│ │ ├── external_subcommands.zsh
│ │ ├── feature_sample.bash
│ │ ├── feature_sample.elvish
│ │ ├── feature_sample.fish
│ │ ├── feature_sample.ps1
│ │ ├── feature_sample.zsh
│ │ ├── home/
│ │ │ ├── .gitignore
│ │ │ ├── dynamic-env/
│ │ │ │ └── exhaustive/
│ │ │ │ ├── bash/
│ │ │ │ │ └── .bashrc
│ │ │ │ ├── elvish/
│ │ │ │ │ └── elvish/
│ │ │ │ │ └── rc.elv
│ │ │ │ ├── fish/
│ │ │ │ │ └── fish/
│ │ │ │ │ ├── completions/
│ │ │ │ │ │ └── exhaustive.fish
│ │ │ │ │ └── config.fish
│ │ │ │ └── zsh/
│ │ │ │ ├── .zshenv
│ │ │ │ └── zsh/
│ │ │ │ └── _exhaustive
│ │ │ └── static/
│ │ │ └── exhaustive/
│ │ │ ├── bash/
│ │ │ │ ├── .bashrc
│ │ │ │ └── .inputrc
│ │ │ ├── elvish/
│ │ │ │ └── elvish/
│ │ │ │ └── rc.elv
│ │ │ ├── fish/
│ │ │ │ └── fish/
│ │ │ │ ├── completions/
│ │ │ │ │ └── exhaustive.fish
│ │ │ │ └── config.fish
│ │ │ ├── powershell/
│ │ │ │ └── powershell/
│ │ │ │ └── Microsoft.PowerShell_profile.ps1
│ │ │ └── zsh/
│ │ │ ├── .zshenv
│ │ │ └── zsh/
│ │ │ └── _exhaustive
│ │ ├── multi_value_option.bash
│ │ ├── multi_value_option.elvish
│ │ ├── multi_value_option.fish
│ │ ├── multi_value_option.ps1
│ │ ├── multi_value_option.zsh
│ │ ├── optional_multi_value_option.bash
│ │ ├── optional_multi_value_option.elvish
│ │ ├── optional_multi_value_option.fish
│ │ ├── optional_multi_value_option.ps1
│ │ ├── optional_multi_value_option.zsh
│ │ ├── optional_value_option.bash
│ │ ├── optional_value_option.elvish
│ │ ├── optional_value_option.fish
│ │ ├── optional_value_option.ps1
│ │ ├── optional_value_option.zsh
│ │ ├── quoting.bash
│ │ ├── quoting.elvish
│ │ ├── quoting.fish
│ │ ├── quoting.ps1
│ │ ├── quoting.zsh
│ │ ├── register_dynamic.fish
│ │ ├── register_minimal.bash
│ │ ├── special_commands.bash
│ │ ├── special_commands.elvish
│ │ ├── special_commands.fish
│ │ ├── special_commands.ps1
│ │ ├── special_commands.zsh
│ │ ├── sub_subcommands.bash
│ │ ├── sub_subcommands.elvish
│ │ ├── sub_subcommands.fish
│ │ ├── sub_subcommands.ps1
│ │ ├── sub_subcommands.zsh
│ │ ├── subcommand_last.bash
│ │ ├── subcommand_last.elvish
│ │ ├── subcommand_last.fish
│ │ ├── subcommand_last.ps1
│ │ ├── subcommand_last.zsh
│ │ ├── two_multi_valued_arguments.bash
│ │ ├── two_multi_valued_arguments.elvish
│ │ ├── two_multi_valued_arguments.fish
│ │ ├── two_multi_valued_arguments.ps1
│ │ ├── two_multi_valued_arguments.zsh
│ │ ├── value_hint.bash
│ │ ├── value_hint.elvish
│ │ ├── value_hint.fish
│ │ ├── value_hint.ps1
│ │ ├── value_hint.zsh
│ │ ├── value_terminator.bash
│ │ ├── value_terminator.elvish
│ │ ├── value_terminator.fish
│ │ ├── value_terminator.ps1
│ │ └── value_terminator.zsh
│ └── testsuite/
│ ├── bash.rs
│ ├── common.rs
│ ├── elvish.rs
│ ├── engine.rs
│ ├── fish.rs
│ ├── general.rs
│ ├── main.rs
│ ├── powershell.rs
│ └── zsh.rs
├── clap_complete_nushell/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── examples/
│ │ ├── nushell_completion.rs
│ │ ├── sub_subcommands.rs
│ │ └── test.rs
│ ├── src/
│ │ └── lib.rs
│ └── tests/
│ ├── common.rs
│ ├── completion.rs
│ ├── nushell.rs
│ └── snapshots/
│ ├── aliases.nu
│ ├── basic.nu
│ ├── feature_sample.nu
│ ├── home/
│ │ └── static/
│ │ └── test/
│ │ └── nu/
│ │ └── .config/
│ │ └── nushell/
│ │ ├── completions/
│ │ │ └── test.nu
│ │ └── config.nu
│ ├── positional_index.nu
│ ├── quoting.nu
│ ├── special_commands.nu
│ ├── sub_subcommands.nu
│ └── value_hint.nu
├── clap_derive/
│ ├── CONTRIBUTING.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── attr.rs
│ ├── derives/
│ │ ├── args.rs
│ │ ├── into_app.rs
│ │ ├── mod.rs
│ │ ├── parser.rs
│ │ ├── subcommand.rs
│ │ └── value_enum.rs
│ ├── dummies.rs
│ ├── item.rs
│ ├── lib.rs
│ ├── macros.rs
│ └── utils/
│ ├── doc_comments.rs
│ ├── error.rs
│ ├── mod.rs
│ ├── spanned.rs
│ └── ty.rs
├── clap_lex/
│ ├── CHANGELOG.md
│ ├── CONTRIBUTING.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── src/
│ │ ├── ext.rs
│ │ └── lib.rs
│ └── tests/
│ └── testsuite/
│ ├── lexer.rs
│ ├── main.rs
│ ├── parsed.rs
│ └── shorts.rs
├── clap_mangen/
│ ├── CHANGELOG.md
│ ├── CONTRIBUTING.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── examples/
│ │ └── man.rs
│ ├── src/
│ │ ├── lib.rs
│ │ └── render.rs
│ └── tests/
│ ├── snapshots/
│ │ ├── aliases.bash.roff
│ │ ├── basic.bash.roff
│ │ ├── configured_display_order_args.roff
│ │ ├── configured_subcmd_order.roff
│ │ ├── default_subcmd_order.roff
│ │ ├── feature_sample.bash.roff
│ │ ├── help_headings.bash.roff
│ │ ├── hidden_option.bash.roff
│ │ ├── multiple_optional_values.bash.roff
│ │ ├── optional_value.bash.roff
│ │ ├── optional_with_required_equals_value.bash.roff
│ │ ├── possible_values.bash.roff
│ │ ├── quoting.bash.roff
│ │ ├── special_commands.bash.roff
│ │ ├── sub_subcommand_help.roff
│ │ ├── sub_subcommands.bash.roff
│ │ ├── value_env.bash.roff
│ │ ├── value_hint.bash.roff
│ │ ├── value_name_without_arg.bash.roff
│ │ ├── value_with_required_equals.bash.roff
│ │ └── variadic_values.bash.roff
│ └── testsuite/
│ ├── common.rs
│ ├── main.rs
│ └── roff.rs
├── committed.toml
├── deny.toml
├── examples/
│ ├── README.md
│ ├── cargo-example-derive.md
│ ├── cargo-example-derive.rs
│ ├── cargo-example.md
│ ├── cargo-example.rs
│ ├── demo.md
│ ├── demo.rs
│ ├── derive_ref/
│ │ ├── augment_args.rs
│ │ ├── augment_subcommands.rs
│ │ ├── flatten_hand_args.rs
│ │ ├── hand_subcommand.rs
│ │ └── interop_tests.md
│ ├── escaped-positional-derive.md
│ ├── escaped-positional-derive.rs
│ ├── escaped-positional.md
│ ├── escaped-positional.rs
│ ├── find.md
│ ├── find.rs
│ ├── git-derive.md
│ ├── git-derive.rs
│ ├── git.md
│ ├── git.rs
│ ├── multicall-busybox.md
│ ├── multicall-busybox.rs
│ ├── multicall-hostname.md
│ ├── multicall-hostname.rs
│ ├── pacman.md
│ ├── pacman.rs
│ ├── repl-derive.rs
│ ├── repl.rs
│ ├── tutorial_builder/
│ │ ├── 01_quick.md
│ │ ├── 01_quick.rs
│ │ ├── 02_app_settings.md
│ │ ├── 02_app_settings.rs
│ │ ├── 02_apps.md
│ │ ├── 02_apps.rs
│ │ ├── 02_crate.md
│ │ ├── 02_crate.rs
│ │ ├── 03_01_flag_bool.md
│ │ ├── 03_01_flag_bool.rs
│ │ ├── 03_01_flag_count.md
│ │ ├── 03_01_flag_count.rs
│ │ ├── 03_02_option.md
│ │ ├── 03_02_option.rs
│ │ ├── 03_02_option_mult.md
│ │ ├── 03_02_option_mult.rs
│ │ ├── 03_03_positional.md
│ │ ├── 03_03_positional.rs
│ │ ├── 03_03_positional_mult.md
│ │ ├── 03_03_positional_mult.rs
│ │ ├── 03_04_subcommands.md
│ │ ├── 03_04_subcommands.rs
│ │ ├── 03_05_default_values.md
│ │ ├── 03_05_default_values.rs
│ │ ├── 03_06_required.md
│ │ ├── 03_06_required.rs
│ │ ├── 04_01_enum.md
│ │ ├── 04_01_enum.rs
│ │ ├── 04_01_possible.md
│ │ ├── 04_01_possible.rs
│ │ ├── 04_02_parse.md
│ │ ├── 04_02_parse.rs
│ │ ├── 04_02_validate.md
│ │ ├── 04_02_validate.rs
│ │ ├── 04_03_relations.md
│ │ ├── 04_03_relations.rs
│ │ ├── 04_04_custom.md
│ │ ├── 04_04_custom.rs
│ │ └── 05_01_assert.rs
│ ├── tutorial_derive/
│ │ ├── 01_quick.md
│ │ ├── 01_quick.rs
│ │ ├── 02_app_settings.md
│ │ ├── 02_app_settings.rs
│ │ ├── 02_apps.md
│ │ ├── 02_apps.rs
│ │ ├── 02_crate.md
│ │ ├── 02_crate.rs
│ │ ├── 03_01_flag_bool.md
│ │ ├── 03_01_flag_bool.rs
│ │ ├── 03_01_flag_count.md
│ │ ├── 03_01_flag_count.rs
│ │ ├── 03_02_option.md
│ │ ├── 03_02_option.rs
│ │ ├── 03_02_option_mult.md
│ │ ├── 03_02_option_mult.rs
│ │ ├── 03_03_positional.md
│ │ ├── 03_03_positional.rs
│ │ ├── 03_03_positional_mult.md
│ │ ├── 03_03_positional_mult.rs
│ │ ├── 03_04_subcommands.md
│ │ ├── 03_04_subcommands.rs
│ │ ├── 03_04_subcommands_alt.rs
│ │ ├── 03_05_default_values.md
│ │ ├── 03_05_default_values.rs
│ │ ├── 03_06_optional.md
│ │ ├── 03_06_optional.rs
│ │ ├── 04_01_enum.md
│ │ ├── 04_01_enum.rs
│ │ ├── 04_02_parse.md
│ │ ├── 04_02_parse.rs
│ │ ├── 04_02_validate.md
│ │ ├── 04_02_validate.rs
│ │ ├── 04_03_relations.md
│ │ ├── 04_03_relations.rs
│ │ ├── 04_04_custom.md
│ │ ├── 04_04_custom.rs
│ │ └── 05_01_assert.rs
│ └── typed-derive/
│ ├── builtin.md
│ ├── builtin.rs
│ ├── custom.md
│ ├── custom.rs
│ ├── fn_parser.md
│ ├── fn_parser.rs
│ ├── foreign_crate.rs
│ ├── implicit.md
│ ├── implicit.rs
│ └── main.rs
├── release.toml
├── src/
│ ├── _concepts.rs
│ ├── _cookbook/
│ │ ├── cargo_example.rs
│ │ ├── cargo_example_derive.rs
│ │ ├── escaped_positional.rs
│ │ ├── escaped_positional_derive.rs
│ │ ├── find.rs
│ │ ├── git.rs
│ │ ├── git_derive.rs
│ │ ├── mod.rs
│ │ ├── multicall_busybox.rs
│ │ ├── multicall_hostname.rs
│ │ ├── pacman.rs
│ │ ├── repl.rs
│ │ ├── repl_derive.rs
│ │ └── typed_derive.rs
│ ├── _derive/
│ │ ├── _tutorial.rs
│ │ └── mod.rs
│ ├── _faq.rs
│ ├── _features.rs
│ ├── _tutorial.rs
│ ├── bin/
│ │ └── stdio-fixture.rs
│ └── lib.rs
├── tests/
│ ├── builder/
│ │ ├── action.rs
│ │ ├── app_settings.rs
│ │ ├── arg_aliases.rs
│ │ ├── arg_aliases_short.rs
│ │ ├── arg_matches.rs
│ │ ├── borrowed.rs
│ │ ├── cargo.rs
│ │ ├── command.rs
│ │ ├── conflicts.rs
│ │ ├── default_missing_vals.rs
│ │ ├── default_vals.rs
│ │ ├── delimiters.rs
│ │ ├── derive_order.rs
│ │ ├── display_order.rs
│ │ ├── double_require.rs
│ │ ├── empty_values.rs
│ │ ├── env.rs
│ │ ├── error.rs
│ │ ├── flag_subcommands.rs
│ │ ├── flags.rs
│ │ ├── global_args.rs
│ │ ├── groups.rs
│ │ ├── help.rs
│ │ ├── help_env.rs
│ │ ├── hidden_args.rs
│ │ ├── ignore_errors.rs
│ │ ├── indices.rs
│ │ ├── macros.rs
│ │ ├── main.rs
│ │ ├── multiple_occurrences.rs
│ │ ├── multiple_values.rs
│ │ ├── occurrences.rs
│ │ ├── opts.rs
│ │ ├── positionals.rs
│ │ ├── posix_compatible.rs
│ │ ├── possible_values.rs
│ │ ├── propagate_globals.rs
│ │ ├── require.rs
│ │ ├── subcommands.rs
│ │ ├── template_help.rs
│ │ ├── tests.rs
│ │ ├── unicode.rs
│ │ ├── unique_args.rs
│ │ ├── utf16.rs
│ │ ├── utf8.rs
│ │ ├── utils.rs
│ │ └── version.rs
│ ├── derive/
│ │ ├── app_name.rs
│ │ ├── arguments.rs
│ │ ├── author_version_about.rs
│ │ ├── basic.rs
│ │ ├── boxed.rs
│ │ ├── custom_string_parsers.rs
│ │ ├── default_value.rs
│ │ ├── deny_warnings.rs
│ │ ├── doc_comments_help.rs
│ │ ├── explicit_name_no_renaming.rs
│ │ ├── flags.rs
│ │ ├── flatten.rs
│ │ ├── generic.rs
│ │ ├── groups.rs
│ │ ├── help.rs
│ │ ├── issues.rs
│ │ ├── macros.rs
│ │ ├── main.rs
│ │ ├── markdown.rs
│ │ ├── naming.rs
│ │ ├── nested_subcommands.rs
│ │ ├── non_literal_attributes.rs
│ │ ├── occurrences.rs
│ │ ├── options.rs
│ │ ├── privacy.rs
│ │ ├── raw_bool_literal.rs
│ │ ├── raw_idents.rs
│ │ ├── rename_all_env.rs
│ │ ├── skip.rs
│ │ ├── subcommands.rs
│ │ ├── type_alias_regressions.rs
│ │ ├── utf8.rs
│ │ ├── utils.rs
│ │ └── value_enum.rs
│ ├── derive_ui/
│ │ ├── bool_value_enum.rs
│ │ ├── bool_value_enum.stderr
│ │ ├── clap_empty_attr.rs
│ │ ├── clap_empty_attr.stderr
│ │ ├── default_value_t_invalid.rs
│ │ ├── default_value_t_invalid.stderr
│ │ ├── default_values_t_invalid.rs
│ │ ├── default_values_t_invalid.stderr
│ │ ├── enum_flatten.rs
│ │ ├── enum_flatten.stderr
│ │ ├── enum_variant_not_args.rs
│ │ ├── enum_variant_not_args.stderr
│ │ ├── external_subcommand_misuse.rs
│ │ ├── external_subcommand_misuse.stderr
│ │ ├── external_subcommand_wrong_type.rs
│ │ ├── external_subcommand_wrong_type.stderr
│ │ ├── flatten_and_methods.rs
│ │ ├── flatten_and_methods.stderr
│ │ ├── flatten_enum_in_struct.rs
│ │ ├── flatten_enum_in_struct.stderr
│ │ ├── flatten_struct_in_enum.rs
│ │ ├── flatten_struct_in_enum.stderr
│ │ ├── group_name_attribute.rs
│ │ ├── group_name_attribute.stderr
│ │ ├── multiple_external_subcommand.rs
│ │ ├── multiple_external_subcommand.stderr
│ │ ├── non_existent_attr.rs
│ │ ├── non_existent_attr.stderr
│ │ ├── rename_all_wrong_casing.rs
│ │ ├── rename_all_wrong_casing.stderr
│ │ ├── skip_flatten.rs
│ │ ├── skip_flatten.stderr
│ │ ├── skip_subcommand.rs
│ │ ├── skip_subcommand.stderr
│ │ ├── skip_with_other_options.rs
│ │ ├── skip_with_other_options.stderr
│ │ ├── skip_without_default.rs
│ │ ├── skip_without_default.stderr
│ │ ├── struct_subcommand.rs
│ │ ├── struct_subcommand.stderr
│ │ ├── subcommand_and_flatten.rs
│ │ ├── subcommand_and_flatten.stderr
│ │ ├── subcommand_and_methods.rs
│ │ ├── subcommand_and_methods.stderr
│ │ ├── subcommand_on_struct.rs
│ │ ├── subcommand_on_struct.stderr
│ │ ├── subcommand_opt_opt.rs
│ │ ├── subcommand_opt_opt.stderr
│ │ ├── subcommand_opt_vec.rs
│ │ ├── subcommand_opt_vec.stderr
│ │ ├── tuple_struct.rs
│ │ ├── tuple_struct.stderr
│ │ ├── value_enum_non_unit.rs
│ │ ├── value_enum_non_unit.stderr
│ │ ├── value_enum_on_struct.rs
│ │ ├── value_enum_on_struct.stderr
│ │ ├── value_parser_unsupported.rs
│ │ └── value_parser_unsupported.stderr
│ ├── derive_ui.rs
│ ├── examples.rs
│ ├── macros.rs
│ ├── ui/
│ │ ├── V_flag_stdout.toml
│ │ ├── arg_required_else_help_stderr.toml
│ │ ├── error_stderr.toml
│ │ ├── h_flag_stdout.toml
│ │ ├── help_cmd_stdout.toml
│ │ ├── help_flag_stdout.toml
│ │ └── version_flag_stdout.toml
│ └── ui.rs
└── typos.toml
================================================
FILE CONTENTS
================================================
================================================
FILE: .cargo/config.toml
================================================
[resolver]
incompatible-rust-versions = "fallback"
================================================
FILE: .clippy.toml
================================================
allow-print-in-tests = true
allow-expect-in-tests = true
allow-unwrap-in-tests = true
allow-dbg-in-tests = true
disallowed-methods = [
{ path = "std::option::Option::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" },
{ path = "std::option::Option::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" },
{ path = "std::result::Result::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" },
{ path = "std::result::Result::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" },
{ path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects" },
{ path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects" },
]
doc-valid-idents = ["PowerShell", ".."]
================================================
FILE: .github/FUNDING.yml
================================================
github: clap-rs
open_collective: clap
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: Bug report
description: An issue with clap, clap_complete, clap_derive, or clap_mangen
labels: ["C-bug", "S-triage"]
body:
- type: checkboxes
attributes:
label: Please complete the following tasks
options:
- label: I have searched the [discussions](https://github.com/clap-rs/clap/discussions)
required: true
- label: I have searched the [open](https://github.com/clap-rs/clap/issues) and [rejected](https://github.com/clap-rs/clap/issues?q=is%3Aissue+label%3AS-wont-fix+is%3Aclosed) issues
required: true
- type: input
attributes:
label: Rust Version
description: Output of `rustc -V`
validations:
required: true
- type: input
attributes:
label: Clap Version
description: Can be found in Cargo.lock or Cargo.toml of your project (i.e. `grep -C1 clap Cargo.lock`). PLEASE DO NOT PUT "latest" HERE, use precise version. Put `master` (or other branch) if you're using the repo directly.
validations:
required: true
- type: textarea
attributes:
label: Minimal reproducible code
description: Please write a minimal complete program which has this bug. Do not point to an existing repository.
value: |
```rust
fn main() {}
```
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce the bug with the above code
description: A command like `cargo run -- options...` or multiple commands.
validations:
required: true
- type: textarea
attributes:
label: Actual Behaviour
description: When I do like *this*, *that* is happening and I think it shouldn't.
validations:
required: true
- type: textarea
attributes:
label: Expected Behaviour
description: I think *this* should happen instead.
validations:
required: true
- type: textarea
attributes:
label: Additional Context
description: Add any other context about the problem here.
- type: textarea
attributes:
label: Debug Output
description: |
Compile clap with `debug` feature:
```toml
[dependencies]
clap = { version = "*", features = ["debug"] }
```
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: true
contact_links:
- name: Ask a question
about: For support or brainstorming
url: https://github.com/clap-rs/clap/discussions/new
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: Feature request
description: Suggest an idea for this project
labels: ["C-enhancement", "S-triage"]
body:
- type: checkboxes
attributes:
label: Please complete the following tasks
options:
- label: I have searched the [discussions](https://github.com/clap-rs/clap/discussions)
required: true
- label: I have searched the [open](https://github.com/clap-rs/clap/issues) and [rejected](https://github.com/clap-rs/clap/issues?q=is%3Aissue+label%3AS-wont-fix+is%3Aclosed) issues
required: true
- type: input
attributes:
label: Clap Version
description: Can be found in Cargo.lock or Cargo.toml of your project (i.e. `grep clap Cargo.lock`). PLEASE DO NOT PUT "latest" HERE, use precise version. Put `master` (or other branch) if you're using the repo directly.
validations:
required: true
- type: textarea
attributes:
label: Describe your use case
description: Describe the problem you're trying to solve. This is not mandatory and we *do* consider features without a specific use case, but real problems have priority.
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like
description: Please explain what the wanted solution should look like. You are **strongly encouraged** to attach a snippet of (pseudo)code.
validations:
required: true
- type: textarea
attributes:
label: Alternatives, if applicable
description: A clear and concise description of any alternative solutions or features you've managed to come up with.
- type: textarea
attributes:
label: Additional Context
description: Add any other context about the feature request here.
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!--
Thanks for helping out!
Please link the appropriate issue from your PR.
If you don't have an issue, we'd recommend starting with one first so the PR can focus on the
implementation (unless its an obvious bug or documentation fix that will have
little conversation).
-->
================================================
FILE: .github/renovate.json5
================================================
{
schedule: [
'before 5am on the first day of the month',
],
semanticCommits: 'enabled',
commitMessageLowerCase: 'never',
configMigration: true,
dependencyDashboard: true,
"pre-commit": {
enabled: true
},
customManagers: [
{
customType: 'regex',
managerFilePatterns: [
'/^rust-toolchain\\.toml$/',
'/Cargo.toml$/',
'/clippy.toml$/',
'/^Makefile$/',
'/^tests/derive_ui.rs$/',
'/\\.clippy.toml$/',
'/^\\.github/workflows/ci.yml$/',
'/^\\.github/workflows/rust-next.yml$/',
],
matchStrings: [
'STABLE.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
'(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?STABLE',
],
depNameTemplate: 'STABLE',
packageNameTemplate: 'rust-lang/rust',
datasourceTemplate: 'github-releases',
},
{
customType: 'regex',
managerFilePatterns: [
'/^\\.github/workflows/pre-commit.yml$/',
],
matchStrings: [
'prek-version.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
],
depNameTemplate: 'prek',
packageNameTemplate: 'j178/prek',
datasourceTemplate: 'github-releases',
},
],
packageRules: [
{
commitMessageTopic: 'Rust Stable',
matchManagers: [
'custom.regex',
],
matchDepNames: [
'STABLE',
],
extractVersion: '^(?<version>\\d+\\.\\d+)', // Drop the patch version
schedule: [
'* * * * *',
],
automerge: true,
},
{
commitMessageTopic: 'Prek',
matchManagers: [
'custom.regex',
],
matchDepNames: [
'prek',
],
extractVersion: '^(?<version>\\d+\\.\\d+\\.\\d+)',
schedule: [
'* * * * *',
],
automerge: true,
},
// Goals:
// - Keep version reqs low, ignoring compatible normal/build dependencies
// - Take advantage of latest dev-dependencies
// - Rollup safe upgrades to reduce CI runner load
// - Help keep number of versions down by always using latest breaking change
// - Have lockfile and manifest in-sync
{
matchManagers: [
'cargo',
],
matchDepTypes: [
'build-dependencies',
'dependencies',
],
matchCurrentVersion: '>=0.1.0',
matchUpdateTypes: [
'patch',
],
enabled: false,
},
{
matchManagers: [
'cargo',
],
matchDepTypes: [
'build-dependencies',
'dependencies',
],
matchCurrentVersion: '>=1.0.0',
matchUpdateTypes: [
'minor',
'patch',
],
enabled: false,
},
{
matchManagers: [
'cargo',
],
matchDepTypes: [
'dev-dependencies',
],
matchCurrentVersion: '>=0.1.0',
matchUpdateTypes: [
'patch',
],
automerge: true,
groupName: 'compatible (dev)',
},
{
matchManagers: [
'cargo',
],
matchDepTypes: [
'dev-dependencies',
],
matchCurrentVersion: '>=1.0.0',
matchUpdateTypes: [
'minor',
'patch',
],
automerge: true,
groupName: 'compatible (dev)',
},
],
}
================================================
FILE: .github/settings.yml
================================================
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
repository:
description: "A full featured, fast Command Line Argument Parser for Rust"
homepage: "docs.rs/clap"
topics: "rust cli command-line argparse clap"
has_issues: true
has_projects: false
has_wiki: false
has_downloads: true
default_branch: master
# Preference: people do clean commits
allow_merge_commit: true
# Backup in case we need to clean up commits
allow_squash_merge: true
# Not really needed
allow_rebase_merge: false
allow_auto_merge: true
delete_branch_on_merge: true
squash_merge_commit_title: "PR_TITLE"
squash_merge_commit_message: "PR_BODY"
merge_commit_message: "PR_BODY"
#labels:
# - name: "A-builder"
# description: "Area: Builder API"
# color: '#f7e101'
# - name: "A-derive"
# description: "Area: #[derive]` macro API"
# color: '#f7e101'
# - name: "A-docs"
# description: "Area: documentation, including docs.rs, readme, examples, etc..."
# color: '#f7e101'
# - name: "A-completion"
# description: "Area: completion generator"
# color: '#f7e101'
# - name: "A-help"
# description: "Area: Help or usage messages"
# color: '#f7e101'
# - name: "A-meta"
# description: "Area: administrative question or tracking issue"
# color: '#f7e101'
# - name: "A-parsing"
# description: "Area: Parser's logic and needs it changed somehow."
# color: '#f7e101'
# - name: "A-validators"
# description: "Area: ArgMatches validation logic
# color: '#f7e101'
# - name: "C-bug"
# description: "Category: Things not working as expected"
# color: '#f5f1fd'
# - name: "C-enhancement"
# description: "Category: Raise on the bar on expectations"
# color: '#f5f1fd'
# - name: "C-tracking-issue"
# description: "Category: A tracking issue for an unstable feature"
# color: '#f5f1fd'
# - name: "C-dependencies"
# description: "Category: Updating dependencies"
# color: '#f5f1fd'
# - name: "E-easy"
# description: "Call for participation: Experience needed to fix: Easy / not much"
# color: '#02E10C'
# - name: "E-medium"
# description: "Call for participation: Experience needed to fix: Medium / intermediate"
# color: '#02E10C'
# - name: "E-hard"
# description: "Call for participation: Experience needed to fix: Hard / a lot"
# color: '#02E10C'
# - name: "E-help-wanted"
# description: "Call for participation: Help is requested to fix this issue."
# color: '#02E10C'
# - name: "S-triage"
# description: "Status: New; needs maintainer attention."
# color: '#D3DDDD'
# - name: "S-blocked"
# description: "Status: Blocked on something else such as an RFC or other implementation work."
# color: '#D3DDDD'
# - name: "S-experimental"
# description: "Status: Ongoing experiment that does not require reviewing and won't be merged in its current state."
# color: '#D3DDDD'
# - name: "S-waiting-on-design"
# description: "Status: Waiting on user-facing design to be resolved before implementing"
# color: '#D3DDDD'
# - name: "S-waiting-on-decision"
# description: "Status: Waiting on a go/no-go before implementing"
# color: '#D3DDDD'
# - name: "S-waiting-on-mentor"
# description: "Status: Needs elaboration on the details before doing a 'Call for participation'"
# color: '#D3DDDD'
# - name: "S-waiting-on-author"
# description: "Status: This is awaiting some action (such as code changes or more information) from the author."
# color: '#D3DDDD'
# - name: "M-breaking-change"
# description: "Meta: Implementing or merging this will introduce a breaking change."
# color: '#E10C02'
# - name: "M-unreviewed"
# description: "Meta: Request for post-merge review."
# color: '#E10C02'
# This serves more as documentation.
# Branch protection API was replaced by rulesets but settings isn't updated.
# See https://github.com/repository-settings/app/issues/825
#
# branches:
# - name: master
# protection:
# required_pull_request_reviews: null
# required_conversation_resolution: true
# required_status_checks:
# # Required. Require branches to be up to date before merging.
# strict: false
# contexts: ["CI", "Spell Check with Typos"]
# enforce_admins: false
# restrictions: null
================================================
FILE: .github/workflows/audit.yml
================================================
name: Security audit
permissions:
contents: read
on:
pull_request:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
push:
branches:
- master
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
security_audit:
permissions:
issues: write # to create issues (actions-rs/audit-check)
checks: write # to create check (actions-rs/audit-check)
runs-on: ubuntu-latest
# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v6
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
cargo_deny:
permissions:
issues: write # to create issues (actions-rs/audit-check)
checks: write # to create check (actions-rs/audit-check)
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- bans licenses sources
steps:
- uses: actions/checkout@v6
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check ${{ matrix.checks }}
rust-version: stable
================================================
FILE: .github/workflows/bench-baseline.yml
================================================
name: Benchmark Baseline
permissions:
contents: read
on:
push:
branches: master
jobs:
bench:
name: Binary Size
permissions:
checks: write
strategy:
matrix:
build: [linux]
include:
- build: linux
os: ubuntu-latest
runs-on: "${{ matrix.os }}"
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Install Bencher
uses: bencherdev/bencher@main
- name: Build
run: "cargo build --package clap --example git-derive -F derive --release"
env:
CARGO_PROFILE_RELEASE_STRIP: true
- name: Report
run: |
bencher run \
--project $(echo "${{ github.repository }}" | sed 's/\//-/g') \
--branch "${{ github.ref_name }}" \
--testbed "${{ matrix.os }}" \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--adapter json \
--file-size target/release/examples/git-derive
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
permissions:
contents: read
on:
pull_request:
push:
branches:
- "*master"
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
ci:
permissions:
contents: none
name: CI
needs: [test, shell-integration, shell-integration-nu, check, ui, minimal-versions, lockfile, docs, rustfmt, clippy, cffconvert]
runs-on: ubuntu-latest
if: "always()"
steps:
- name: Failed
run: exit 1
if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')"
test:
name: Test
strategy:
matrix:
build: [linux, windows, mac, minimal, default, next]
include:
- build: linux
os: ubuntu-latest
rust: "stable"
features: "full"
- build: windows
os: windows-latest
rust: "stable"
features: "full"
- build: mac
os: macos-latest
rust: "stable"
features: "full"
- build: minimal
os: ubuntu-latest
rust: "stable"
features: "minimal"
- build: default
os: ubuntu-latest
rust: "stable"
features: "default"
- build: next
os: ubuntu-latest
rust: "stable"
features: "next"
continue-on-error: ${{ matrix.rust != 'stable' }}
runs-on: ${{ matrix.os }}
env:
# Reduce amount of data cached
CARGO_PROFILE_DEV_DEBUG: line-tables-only
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- name: Build
run: make build-${{matrix.features}}
- name: Test
run: make test-${{matrix.features}}
- name: Test (benches)
run: make test-${{matrix.features}} ARGS='--workspace --benches'
- name: Test (ultra-minimal)
if: matrix.build == 'minimal'
run: make test-minimal ARGS='--manifest-path Cargo.toml'
- name: Test dynamic completions
run: cargo test -p clap_complete -F unstable-dynamic
shell-integration:
name: Shell Integration
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Install shells
if: runner.os == 'Linux'
run: sudo apt-get install -y elvish fish zsh
- name: clap_complete
run: cargo test -p clap_complete -F unstable-dynamic -F unstable-shell-tests
shell-integration-nu:
name: Nushell Integration
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: clap_complete_nu
run: cargo test -p clap_complete_nushell -F unstable-shell-tests
check:
name: Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build: [msrv, wasm, wasm-wasi, debug, release]
include:
- build: msrv
rust: "1.85" # MSRV
target: x86_64-unknown-linux-gnu
features: full
- build: wasm
rust: stable
target: wasm32-unknown-unknown
features: wasm
- build: wasm-wasi
rust: stable
target: wasm32-wasip2
features: wasm
- build: debug
rust: stable
target: x86_64-unknown-linux-gnu
features: debug
- build: release
rust: stable
target: x86_64-unknown-linux-gnu
features: release
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- name: Check
run: make check-${{ matrix.features }}
env:
TOOLCHAIN_TARGET: ${{ matrix.target }}
ui:
name: UI Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
features: [default, next]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.94" # STABLE
- uses: Swatinem/rust-cache@v2
- name: UI Tests
run: make test-ui-${{ matrix.features }}
minimal-versions:
name: Minimal versions
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install nightly Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- name: Downgrade dependencies to minimal versions
run: cargo +nightly generate-lockfile -Z minimal-versions
- name: Compile with minimal versions
run: cargo +stable check --workspace --all-features --locked --exclude clap_complete_nushell --exclude clap_bench
lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: "Is lockfile updated?"
run: cargo update --workspace --locked
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.94" # STABLE
- uses: Swatinem/rust-cache@v2
- name: Check documentation
env:
RUSTDOCFLAGS: -D warnings
run: make doc
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.94" # STABLE
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --check
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.94" # STABLE
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Lint (ultra-minimal)
run: make clippy-minimal ARGS='--manifest-path Cargo.toml'
- name: Lint (minimal)
run: make clippy-minimal
- name: Lint (all)
run: make clippy-full
- name: Lint (release)
run: make clippy-release
cffconvert:
name: cffconvert
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: CFF validation
uses: citation-file-format/cffconvert-github-action@2.0.0
with:
args: --validate
================================================
FILE: .github/workflows/committed.yml
================================================
# Not run as part of pre-commit checks because they don't handle sending the correct commit
# range to `committed`
name: Lint Commits
on: [pull_request]
permissions:
contents: read
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
committed:
name: Lint Commits
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Lint Commits
uses: crate-ci/committed@master
================================================
FILE: .github/workflows/post-release.yml
================================================
name: post-release
on:
push:
tags:
- "v*"
permissions:
contents: read
jobs:
create-release:
permissions:
contents: write # for actions/create-release to create a release
name: create-release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.release.outputs.upload_url }}
release_version: ${{ env.RELEASE_VERSION }}
steps:
- name: Get the release version from the tag
shell: bash
if: env.RELEASE_VERSION == ''
run: |
# See: https://github.community/t5/GitHub-Actions/How-to-get-just-the-tag-name/m-p/32167/highlight/true#M1027
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "version is: ${{ env.RELEASE_VERSION }}"
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Generate Release Notes
run: |
./.github/workflows/release-notes.py --tag ${{ env.RELEASE_VERSION }} --output notes-${{ env.RELEASE_VERSION }}.md
cat notes-${{ env.RELEASE_VERSION }}.md
- name: Create GitHub release
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_VERSION }}
release_name: ${{ env.RELEASE_VERSION }}
body_path: notes-${{ env.RELEASE_VERSION }}.md
================================================
FILE: .github/workflows/pre-commit.yml
================================================
name: pre-commit
permissions: {} # none
on:
pull_request:
push:
branches: [master]
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
pre-commit:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: j178/prek-action@v1
with:
prek-version: '0.2.27'
================================================
FILE: .github/workflows/release-notes.py
================================================
#!/usr/bin/env python3
import argparse
import re
import pathlib
import sys
_STDIO = pathlib.Path("-")
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--input", type=pathlib.Path, default="CHANGELOG.md")
parser.add_argument("--tag", required=True)
parser.add_argument("-o", "--output", type=pathlib.Path, required=True)
args = parser.parse_args()
if args.input == _STDIO:
lines = sys.stdin.readlines()
else:
with args.input.open() as fh:
lines = fh.readlines()
version = args.tag.lstrip("v")
note_lines = []
for line in lines:
if line.startswith("## ") and version in line:
note_lines.append(line)
elif note_lines and line.startswith("## "):
break
elif note_lines:
note_lines.append(line)
notes = "".join(note_lines).strip()
if args.output == _STDIO:
print(notes)
else:
args.output.write_text(notes)
if __name__ == "__main__":
main()
================================================
FILE: .github/workflows/rust-next.yml
================================================
name: rust-next
permissions:
contents: read
on:
schedule:
- cron: '3 3 3 * *'
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
test:
name: Test
strategy:
matrix:
build: [stable, linux, windows, mac, nightly, minimal, default, next]
include:
- build: stable
os: ubuntu-latest
rust: "stable"
features: "full"
- build: linux
os: ubuntu-latest
rust: "beta"
features: "full"
- build: windows
os: windows-latest
rust: "beta"
features: "full"
- build: mac
os: macos-latest
rust: "beta"
features: "full"
- build: nightly
os: ubuntu-latest
rust: "nightly"
features: "full"
- build: minimal
os: ubuntu-latest
rust: "stable"
features: "minimal"
- build: default
os: ubuntu-latest
rust: "stable"
features: "default"
- build: next
os: ubuntu-latest
rust: "stable"
features: "next"
continue-on-error: ${{ matrix.rust != 'stable' }}
runs-on: ${{ matrix.os }}
env:
# Reduce amount of data cached
CARGO_PROFILE_DEV_DEBUG: line-tables-only
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- name: Install shells
if: runner.os == 'Linux'
run: sudo apt-get install -y elvish fish zsh
- name: Build
run: make build-${{matrix.features}}
- name: Test
run: make test-${{matrix.features}}
- name: Test (benches)
run: make test-${{matrix.features}} ARGS='--workspace --benches'
- name: Test (ultra-minimal)
if: matrix.build == 'minimal'
run: make test-minimal ARGS='--manifest-path Cargo.toml'
- name: Test dynamic completions
run: cargo test -p clap_complete -F unstable-dynamic
latest:
name: "Check latest dependencies"
strategy:
matrix:
build: [stable]
include:
- build: stable
os: ubuntu-latest
rust: "stable"
features: "full"
runs-on: ${{ matrix.os }}
env:
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: allow
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
- name: Install shells
if: runner.os == 'Linux'
run: sudo apt-get install -y elvish fish zsh
- name: Update dependencies
run: cargo update
- name: Build
run: make build-${{matrix.features}}
- name: Test
run: make test-${{matrix.features}}
- name: Test (benches)
run: make test-${{matrix.features}} ARGS='--workspace --benches'
- name: Test (ultra-minimal)
if: matrix.build == 'minimal'
run: make test-minimal ARGS='--manifest-path Cargo.toml'
- name: Test dynamic completions
run: cargo test -p clap_complete -F unstable-dynamic
================================================
FILE: .github/workflows/spelling.yml
================================================
name: Spelling
permissions:
contents: read
on: [pull_request]
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
spelling:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v6
- name: Spell Check Repo
uses: crate-ci/typos@master
================================================
FILE: .github/workflows/template.yml
================================================
name: Template Update
permissions:
contents: read
on:
schedule:
- cron: '1 1 1 * *'
workflow_dispatch:
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
TEMPLATE_URL: "https://github.com/epage/_rust.git"
TEMPLATE_BRANCH: "main"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
update:
permissions:
security-events: write # to create PR
pull-requests: write
contents: write # to push the branch
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Configure git
run: |
git config --global user.name '${{ github.actor }}'
git config --global user.email '<>'
- name: Fetch template
run: "git remote add template ${{ env.TEMPLATE_URL }} && git fetch template ${{ env.TEMPLATE_BRANCH }}"
- name: Merge template
run: "git checkout -b template-update && git merge template/${{ env.TEMPLATE_BRANCH }} -m 'chore: Update from template'"
- name: Clear any existing branch
run: "git push origin --delete template-update"
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}
- name: Push branch
run: "git push --set-upstream origin template-update"
env:
GH_TOKEN: ${{ github.token }}
- name: Create PR
run: "gh pr create --head template-update --title 'chore: Update from template' --body ''"
env:
GH_TOKEN: ${{ github.token }}
- name: Merge PR
run: "gh pr merge --auto --delete-branch"
env:
GH_TOKEN: ${{ github.token }}
================================================
FILE: .gitignore
================================================
target
================================================
FILE: .pre-commit-config.yaml
================================================
exclude: |
(?x)^(
tests/.*|
CHANGELOG.md
)$
default_install_hook_types: ["pre-commit", "commit-msg"]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-merge-conflict
- id: check-case-conflict
- id: detect-private-key
- repo: https://github.com/crate-ci/typos
rev: v1.44.0
hooks:
- id: typos
- repo: https://github.com/crate-ci/committed
rev: v1.1.11
hooks:
- id: committed
================================================
FILE: CHANGELOG.md
================================================
# Change Log
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).
## 5.0.0 - TBD
*available through `unstable-v5` feature flag*
### Breaking Changes
- Made `ArgPredicate` `non_exhaustive`
- *(help)* Change default `Command::term_width` to "source format"
- *(help)* Change default `Command::max_term_width` to 100
- *(derive)* `Vec<Vec<T>>` types are now assuming to capture occurrences
- *(derive)* `ValueEnum` variants now use the full doc comment, not summary, for `PossibleValue::help`
### Features
- *(derive)* Group values by their occurrence with `Vec<Vec<T>>`
<!-- next-header -->
## [Unreleased] - ReleaseDate
## [4.6.0] - 2026-03-12
### Compatibility
- Update MSRV to 1.85
## [4.5.61] - 2026-03-12
### Internal
- Update dependencies
## [4.5.60] - 2026-02-19
### Fixes
- *(help)* Quote empty default values, possible values
## [4.5.59] - 2026-02-16
### Fixes
- `Command::ignore_errors` no longer masks help/version on subcommands
## [4.5.58] - 2026-02-11
## [4.5.57] - 2026-02-03
### Fixes
- Regression from 4.5.55 where having an argument with `.value_terminator("--")` caused problems with an argument with `.last(true)`
## [4.5.56] - 2026-01-29
### Fixes
- On conflict error, don't show conflicting arguments in the usage
## [4.5.55] - 2026-01-27
### Fixes
- Fix inconsistency in precedence between positionals with a `value_terminator("--")` and escapes (`--`) where `./foo -- bar` means the first arg is empty, rather than escaping future args
## [4.5.54] - 2026-01-02
### Fixes
- *(help)* Move `[default]` to its own paragraph when `PossibleValue::help` is present in `--help`
## [4.5.53] - 2025-11-19
### Features
- Add `default_values_if`, `default_values_ifs`
## [4.5.52] - 2025-11-17
### Fixes
- Don't panic when `args_conflicts_with_subcommands` conflicts with an `ArgGroup`
## [4.5.51] - 2025-10-29
### Fixes
- *(help)* Correctly calculate padding for short flags that take a value
- *(help)* Don't panic on short flags using `ArgAction::Count`
## [4.5.50] - 2025-10-20
### Features
- Accept `Cow` where `String` and `&str` are accepted
## [4.5.49] - 2025-10-13
### Fixes
- *(help)* Correctly wrap when ANSI escape codes are present
## [4.5.48] - 2025-09-19
### Documentation
- Add a new CLI Concepts document as another way of framing clap
- Expand the `typed_derive` cookbook entry
## [4.5.47] - 2025-09-02
### Features
- Added `impl FromArgMatches for ()`
- Added `impl Args for ()`
- Added `impl Subcommand for ()`
- Added `impl FromArgMatches for Infallible`
- Added `impl Subcommand for Infallible`
### Fixes
- *(derive)* Update runtime error text to match `clap`
## [4.5.46] - 2025-08-26
### Features
- Expose `StyledStr::push_str`
## [4.5.45] - 2025-08-12
### Fixes
- *(unstable-v5)* `ValueEnum` variants now use the full doc comment, not summary, for `PossibleValue::help`
## [4.5.44] - 2025-08-11
### Features
- Add `Command::mut_subcommands`
## [4.5.43] - 2025-08-06
### Fixes
- *(help)* In long help, list Possible Values before defaults, rather than after, for a more consistent look
## [4.5.42] - 2025-07-30
### Fixes
- Include subcommand visible long aliases in `--help`
## [4.5.41] - 2025-07-09
### Features
- Add `Styles::context` and `Styles::context_value` to customize the styling of `[default: value]` like notes in the `--help`
## [4.5.40] - 2025-06-09
### Features
- Support quoted ids in `arg!()` macro (e.g. `arg!("check-config": ...)`)
## [4.5.39] - 2025-05-27
### Fixes
- *(help)* Show short flag aliases before long
- *(help)* Merge the short and long flag alias lists
## [4.5.38] - 2025-05-11
### Fixes
- *(help)* When showing aliases, include leading `--` or `-`
## [4.5.37] - 2025-04-18
### Features
- Added `ArgMatches::try_clear_id()`
## [4.5.36] - 2025-04-11
### Fixes
- *(help)* Revert 4.5.35's "Don't leave space for shorts if there are none" for now
## [4.5.35] - 2025-04-01
### Fixes
- *(help)* Align positionals and flags when put in the same `help_heading`
- *(help)* Don't leave space for shorts if there are none
## [4.5.34] - 2025-03-27
### Fixes
- *(help)* Don't add extra blank lines with `flatten_help(true)` and subcommands without arguments
## [4.5.33] - 2025-03-26
### Fixes
- *(error)* When showing the usage of a suggestion for an unknown argument, don't show the group
## [4.5.32] - 2025-03-10
### Features
- Add `Error::remove`
### Documentation
- *(cookbook)* Switch from `humantime` to `jiff`
- *(tutorial)* Better cover required vs optional
### Internal
- Update `pulldown-cmark`
## [4.5.31] - 2025-02-24
### Features
- Add `ValueParserFactory` for `Saturating<T>`
## [4.5.30] - 2025-02-17
### Fixes
- *(assert)* Allow `num_args(0..=1)` to be used with `SetTrue`
- *(assert)* Clean up rendering of `takes_values` assertions
## [4.5.29] - 2025-02-11
### Fixes
- Change `ArgMatches::args_present` so not-present flags are considered not-present (matching the documentation)
## [4.5.28] - 2025-02-03
### Features
- *(derive)* Unstable support for full markdown syntax for doc comments, enabled with `unstable-markdown`
## [4.5.27] - 2025-01-20
### Documentation
- Iterate on tutorials and reference based on feedback
## [4.5.26] - 2025-01-09
### Fixes
- *(error)* Reduce binary size with the `suggestions` feature
## [4.5.25] - 2025-01-09
### Fixes
- *(help)* Reduce binary size
## [4.5.24] - 2025-01-07
### Fixes
- *(parser)* Correctly handle defaults with `ignore_errors(true)` and when a suggestion is provided for an unknown argument
## [4.5.23] - 2024-12-05
### Fixes
- *(parser)* When check `allow_negative_numbers`, allow `E` again
## [4.5.22] - 2024-12-03
### Fixes
- *(assert)* Catch bugs with arguments requiring themself
## [4.5.21] - 2024-11-13
### Fixes
- *(parser)* Ensure defaults are filled in on error with `ignore_errors(true)`
## [4.5.20] - 2024-10-08
### Features
- *(unstable)* Add `CommandExt`
## [4.5.19] - 2024-10-01
### Internal
- Update dependencies
## [4.5.18] - 2024-09-20
### Features
- *(builder)* Expose `Arg::get_display_order` and `Command::get_display_order`
## [4.5.17] - 2024-09-04
### Fixes
- *(help)* Style required argument groups
- *(derive)* Improve error messages when unsupported fields are used
## [4.5.16] - 2024-08-15
### Fixes
- *(derive)* Improve error messages when `derive` feature is missing
## [4.5.15] - 2024-08-10
### Compatiblity
- *(unstable-ext)* `Arg::remove` changed return types
### Fixes
- *(unstable-ext)* Make `Arg::remove` return the removed item
## [4.5.14] - 2024-08-08
### Features
- *(unstable-ext)* Added `Arg::add` for attaching arbitrary state, like completion hints, to `Arg` without `Arg` knowing about it
## [4.5.13] - 2024-07-31
### Fixes
- *(derive)* Improve error message when `#[flatten]`ing an optional `#[group(skip)]`
- *(help)* Properly wrap long subcommand descriptions in help
## [4.5.12] - 2024-07-31
## [4.5.11] - 2024-07-25
## [4.5.10] - 2024-07-23
## [4.5.9] - 2024-07-09
### Fixes
- *(error)* When defining a custom help flag, be sure to suggest it like we do the built-in one
## [4.5.8] - 2024-06-28
### Fixes
- Reduce extra flushes
## [4.5.7] - 2024-06-10
### Fixes
- Clean up error message when too few arguments for `num_args`
## [4.5.6] - 2024-06-06
## [4.5.5] - 2024-06-06
### Fixes
- Allow `exclusive` to override `required_unless_present`, `required_unless_present_any`, `required_unless_present_all`
## [4.5.4] - 2024-03-25
### Fixes
- *(derive)* Allow non-literal `#[arg(id)]` attributes again
## [4.5.3] - 2024-03-15
### Internal
- *(derive)* Update `heck`
## [4.5.2] - 2024-03-06
### Fixes
- *(macros)* Silence a warning
## [4.5.1] - 2024-02-16
### Fixes
- *(error)* Include suggestion to add `--` even if there is a "did you mean" so long as `last` or `trailing_var_arg` is used
## [4.5.0] - 2024-02-08
### Compatibility
- Update MSRV to 1.74
## [4.4.18] - 2024-01-16
### Fixes
- *(error)* When lacking `usage` feature, ensure the list of required arguments is unique
## [4.4.17] - 2024-01-15
### Fixes
- Fix `panic!` when mixing `args_conflicts_with_subcommands` with `ArgGroup` (which is implicit with `derive`) introduced in 4.4.15
## [4.4.16] - 2024-01-12
### Fixes
- Ensure invalid escape sequences in user-defined strings are correctly stripped when terminal doesn't support color
## [4.4.15] - 2024-01-11
### Fixes
- Improve error for `args_conflicts_with_subcommands`
- Ensure we error for `args_conflicts_with_subcommands` when using subcommand short and long flags
## [4.4.14] - 2024-01-08
### Documentation
- Fix `find` cookbook entry to allow repeats of flags/options
### Features
- Allow `num_args(0)` on options which allows making them emulate being a flag for position-tracking flags
## [4.4.13] - 2024-01-04
### Documentation
- Fix link to structopt migration guide
## [4.4.12] - 2023-12-28
### Performance
- Only ask `TypedValueParser` for possible values if needed
## [4.4.11] - 2023-12-04
### Features
- Add `Command::mut_group`
## [4.4.10] - 2023-11-28
### Documentation
- Link out to changelog
- Cross link derive's attribute reference to derive tutorial
## [4.4.9] - 2023-11-27
### Fixes
- *(help)* Show correct `Command::about` under flattened headings
- *(help)* Respect `hide` when flattening subcommands
## [4.4.8] - 2023-11-10
### Features
- Add `Command::flatten_help` to allow `git stash -h` like help for subcommands
## [4.4.7] - 2023-10-24
### Performance
- Reduced code size
## [4.4.6] - 2023-09-28
### Internal
- Upgrade `anstream`
## [4.4.5] - 2023-09-25
### Fixes
- *(parser)* When inferring subcommand `name` or `long_flag`, allow ambiguous-looking matches that unambiguously map back to the same command
- *(parser)* When inferring subcommand `long_flag`, don't panic
- *(assert)* Clarify what action is causing a positional that doesn't set values which is especially useful for derive users
## [4.4.4] - 2023-09-18
### Internal
- Update `terminal_size` to 0.3
## [4.4.3] - 2023-09-12
### Documentation
- *(derive)* Clarify use of attributes within the tutorial
- Split sections in the builder and derive tutorials into separate modules
## [4.4.2] - 2023-08-31
### Performance
- Improve build times by removing `once_cell` dependency
## [4.4.1] - 2023-08-28
### Features
- Stabilize `Command::styles`
## [4.4.0] - 2023-08-24
### compatibility
- update msrv to 1.70.0
## [4.3.24] - 2023-08-23
### Fixes
- Ensure column padding is preserved in `--help` with custom templates
## [4.3.23] - 2023-08-18
### Fixes
- Fixed `UnknownArgumentValueParser` to not error on flag's absence
## [4.3.22] - 2023-08-17
### Features
- Add `UnknownArgumentValueParser` for injecting errors for improving the experience with errors
## [4.3.21] - 2023-08-08
### Features
- Expose `TryMapValueParser` so the type can be named
## [4.3.20] - 2023-08-08
### Features
- `Command::mut_args` for modifying all arguments en masse
## [4.3.19] - 2023-07-21
### Fixes
- *(parse)* Respect `value_terminator` even in the presence of later multiple-value positional arguments
## [4.3.18] - 2023-07-21
### Fixes
- *(parse)* Suggest `--` in fewer places where it won't work
## [4.3.17] - 2023-07-19
### Fixes
- *(help)* Address a regression in wrapping `PossibleValue` descriptions in `--help`
## [4.3.16] - 2023-07-18
### Fixes
- Don't assert when stateful value parsers fail on defaults (e.g. checking if a path exists)
## [4.3.15] - 2023-07-18
### Features
- *(unstable-styles)* Re-export `anstyle`
### Documentation
- *(unstable-styles)* Provide more examples
## [4.3.14] - 2023-07-17
### Features
- `ArgAction::HelpShort` and `ArgAction::HelpLong` for explicitly specifying which style of help to display
### Fixes
- Skip `[OPTIONS]` in usage if a help or version `ArgAction` is used
## [4.3.13] - 2023-07-17
## [4.3.12] - 2023-07-14
### Fixes
- *(derive)* Don't error on enum variant field attributes
## [4.3.11] - 2023-07-05
### Features
- *(derive)* Support fields wrapped in `num::Wrapping`, `Box`, or `Arc`
- *(derive)* Support `Box<str>`, `Box<OsStr>`, and `Box<Path>`
## [4.3.10] - 2023-06-30
### Performance
- Drop a dependency, reducing binary size by 1.3 KiB
## [4.3.9] - 2023-06-28
### Fixes
- `Command::ignore_errors` no longer masks help/version
## [4.3.8] - 2023-06-23
### Fixes
- Error on ambiguity with `infer_long_arg`, rather than arbitrarily picking one, matching the documentation and subcommand's behavior
## [4.3.7] - 2023-06-23
### Documentation
- Further clarify magic behavior in derive tutorial
- Further clarify derive API's relationship to builder within the tutorial
## [4.3.6] - 2023-06-23
### Documentation
- Suggest `clio`
## [4.3.5] - 2023-06-20
- `ColorChoice::possible_values` is added to simplify things for builder users
### Fixes
- `ColorChoice::to_possible_value` no longer includes descriptions, encouraging shorter help where possible
## [4.3.4] - 2023-06-14
### Features
- Add `Error::exit_code`
## [4.3.3] - 2023-06-09
### Features
- `Command::defer` for delayed initialization of subcommands to reduce startup times of large applications like deno
## [4.3.2] - 2023-06-05
### Fixes
- *(derive)* Don't produce `unused_equalifications` warnings when someone brings a clap type into scope
## [4.3.1] - 2023-06-02
### Performance
- *(derive)* Reduce the amount of generated code
## [4.3.0] - 2023-05-19
### Fixes
- *(assert)* Allow multiple, value-terminated, positional arguments
- *(assert)* Clear up language on `last` assertion
- *(parser)* Correctly assign values to arguments when using multiple, value-termianted, positional arguments
- *(parser)* Ensure `value_terminator` has higher precedence than `allow_hyphen_values`
- *(help)* Only use next-line-help on subcommand list when explicitly specified, not just with `--help`
- *(help)* Correctly align possible values list
- *(help)* Don't waste code, vertical space in moving possible value descriptions to next line
## [4.2.7] - 2023-05-02
### Fixes
- Correctly track remaining length for iterators provided by `ArgMatches`
## [4.2.6] - 2023-05-02
### Features
- `impl Eq<std::any::TypeId> for clap_builder::util::AnyValueId`
## [4.2.5] - 2023-04-27
### Fixes
- Improve panic when a group requires a non-existent ID
## [4.2.4] - 2023-04-19
### Documentation
- Corrected docs for `Command::style`
## [4.2.3] - 2023-04-18
### Features
- `Command::styles` for theming help/errors (behind `unstable-styles`)
## [4.2.2] - 2023-04-13
### Internal
- Update dependencies
## [4.2.1] - 2023-03-28
### Fixes
- Don't highlight uninteresting parts of the error message
## [4.2.0] - 2023-03-28
### Compatibility
- Removed the languishing `unstable-replace` feature (open to discussion at [#2836](https://github.com/clap-rs/clap/issues/2836))
- Removed the stablized `unstable-grouped` feature
### Features
- Allow any `StyledStr` to accept text styled with ANSI escape codes
- Respect `CLICOLOR`, `CLICOLOR_FORCE`
### Fixes
- Lighten the tone for "unexpected argument" errors (open to discussion at [#4638](https://github.com/clap-rs/clap/issues/4638))
## [4.1.14] - 2023-03-28
### Features
- *(derive)* `#[group]` raw attribute support
### Performance
- *(derive)* `clap_builder` was pulled out of `clap` so it could build in parallel to `clap_derive`
- `os_str_bytes` dependency was removed for faster builds and smaller binaries
## [4.1.13] - 2023-03-18
### Performance
- Reduce repeated alloc calls when building a `Command`
- Reduce duplicate dependencies for faster builds
## [4.1.12] - 2023-03-18
### Internal
- *(derive)* Update to `syn` v2
### Performance
- *(derive)* Faster build times by dropping `proc-macro-error` dependency
## [4.1.11] - 2023-03-17
### Internal
- Update `bitflags`
## [4.1.10] - 2023-03-17
### Fixes
- *(help)* On Windows, avoid underlined text artifacts
## [4.1.9] - 2023-03-16
### Fixes
- *(assert)* Improve the assert when using the wrong action with `get_count` / `get_flag`
## [4.1.8] - 2023-02-27
### Fixes
- *(derive)* Don't `deny` lints on the users behalf
## [4.1.7] - 2023-02-27
### Fixes
- *(derive)* Hide some nightly clippy warnings
## [4.1.6] - 2023-02-15
### Fixes
- *(help)* Don't show long help for `--help` just because hidden possible values include a description
## [4.1.5] - 2023-02-15
### Fixes
- *(help)* Don't show long help for `--help` just because a hidden arg has a possible value with a description
## [4.1.4] - 2023-01-24
### Fixes
- *(help)* Respect `disable_colored_help` when using `arg_required_else_help`
### Performance
- Speed up compiling `arg!` macro
## [4.1.3] - 2023-01-23
### Fixes
- *(error)* Improve suggested flag/value/subcommand when two share a long preifx
- *(error)* When suggesting one of several subcommands, use the plural `subcommands`, rather than `subcommand`
## [4.1.2] - 2023-01-23
### Fixes
- In documentation, refer to `get_flag`, rather than `get_one::<bool>`
## [4.1.1] - 2023-01-14
### Fixes
- *(error)* Small softening attempt for "unexpected argument" error
## [4.1.0] - 2023-01-13
### Compatibility
MSRV changed to 1.64.0
For apps with custom `--help` and `--version` flags:
- Descriptions for `--help` and `--version` changed
When apps have errors imitating clap's error style:
- Error message style was changed, including
- Moving away from "did you mean" to tips
- Leading letter is lower case
- "For more" added some punctuation
### Features
- `ArgMatches::get_occurrences` support for argument values to be grouped by their occurrence
### Fixes
- *(derive)* Allow `upgrade_from` when arguments / subcommands are explicitly marked as required
- *(help)* Try be more clearer and succinct with `--help` and `--version` (also helps with overflow)
- *(error)* Try to be more clearer and succinct with error messages
- *(error)* Officially adopt [an error style guide](https://rustc-dev-guide.rust-lang.org/diagnostics.html#suggestion-style-guide)
## [4.0.32] - 2022-12-22
### Fixes
- *(parser)* When overriding `required(true)`, consider args that conflict with its group
## [4.0.31] - 2022-12-22
### Performance
- Speed up parsing when a lot of different flags are present (100 unique flags)
## [4.0.30] - 2022-12-21
### Fixes
- *(error)* Improve error for `args_conflicts_with_subcommand`
## [4.0.29] - 2022-11-29
## [4.0.28] - 2022-11-29
### Fixes
- Fix wasm support which was broken in 4.0.27
## [4.0.27] - 2022-11-24
### Features
- Have `Arg::value_parser` accept `Vec<impl Into<PossibleValue>>`
- Implement `Display` and `FromStr` for `ColorChoice`
### Fixes
- Remove soundness issue by switching from `atty` to `is-terminal`
## [4.0.26] - 2022-11-16
### Fixes
- *(error)* Fix typos in `ContextKind::as_str`
## [4.0.25] - 2022-11-15
### Features
- *(error)* Report available subcommands when required subcommand is missing
## [4.0.24] - 2022-11-14
### Fixes
- Avoid panic when printing an argument that isn't built
## [4.0.23] - 2022-11-11
### Fixes
- Don't panic on reporting invalid-long errors when followed by invalid UTF8
- *(help)* Clarified argument to `help` subcommand
## [4.0.22] - 2022-11-07
### Fixes
- *(help)* Don't overflow into next-line-help early due to stale (pre-v4) padding calculations
## [4.0.21] - 2022-11-07
### Features
- *(derive)* `long_about` and `long_help` attributes, without a value, force using doc comment (before it wouldn't be set if there wasn't anything different than the short help)
## [4.0.20] - 2022-11-07
### Fixes
- *(derive)* Allow defaulted value parser for '()' fields
## [4.0.19] - 2022-11-04
### Features
- `ColorChoice` now implements `ValueEnum`
## [4.0.18] - 2022-10-20
### Fixes
- *(derive)* Allow `#[command(skip)]` to also work with enum variants with a value
## [4.0.17] - 2022-10-18
### Fixes
- Allow using `Arg::last(true)` with `Arg::value_hint(ValueHint::CommandWithArguments)`
## [4.0.16] - 2022-10-18
### Fixes
- `Arg::exclusive(true)` should not be exclusive with the argument's own `ArgGroup`
## [4.0.15] - 2022-10-13
### Fixes
- *(error)* Don't suggest `--` when it doesn't help
- *(error)* Be more consistent in quoting, punctuation, and indentation in errors
## [4.0.14] - 2022-10-12
### Fixes
- Only put `ArgGroup` in `ArgMatches` when explicitly specified, fixing derives handling of option-flattened fields (#4375)
## [4.0.13] - 2022-10-11
### Features
- *(derive)* Allow `()` for fields to mean "don't read" (#4371)
## [4.0.12] - 2022-10-10
### Features
- Added `TypedValueParser::try_map` for when adapting an existing `TypedValueParser` can fail
- *(error)* Create errors like clap with `Error::new`, `Error::with_cmd`, and `Error::insert`
## [4.0.11] - 2022-10-09
### Fixes
- *(help)* Fix wrapping calculations with ANSI escape codes
## [4.0.10] - 2022-10-05
### Features
- *(derive)* Support `#[arg(flatten)]` on `Option` types (#4211, #4350)
## [4.0.9] - 2022-10-03
### Fixes
- *(derive)* Process doc comments for `#[command(subcommand)]` like in clap v3
## [4.0.8] - 2022-10-01
### Fixes
- *(derive)* Remove a low-value assert preventing defaulting `Help` and `Version` actions
## [4.0.7] - 2022-09-30
### Features
- *(derive)* Populate implicit ArgGroup (#3165)
### Fixes
- *(derive)* Support `#[group(skip)]` on `Parser` derive
- *(derive)* Tell users about implicit arg groups when running into group name conflicts
- *(error)* Don't report unrelated groups in conflict or requires errors
## [4.0.6] - 2022-09-30
### Features
- *(derive)* Support `#[group(skip)]` (#4279, #4301)
## [4.0.5] - 2022-09-30
## [4.0.4] - 2022-09-29
### Fixes
- *(error)* Specialize the self-conflict error to look like clap v3
## [4.0.3] - 2022-09-29
### Fixes
- *(error)* Quote literals consistently
- *(error)* Stylize escape (`--`) suggestions
- *(error)* Format help flag as a literal
## [4.0.2] - 2022-09-28
### Fixes
- *(parser)* `SetFalse` should conflict with itself like `SetTrue` and `Set`
- *(parser)* Allow one-off overrides
## [4.0.1] - 2022-09-28
### Fixes
- *(derive)* Ensure `#[clap(...)]` attribute still works
## [4.0.0] - 2022-09-28
### Highlights
**`Arg::num_args(range)`**
Clap has had several ways for controlling how many values will be captured without always being clear on how they interacted, including
- `Arg::multiple_values(true)`
- `Arg::number_of_values(4)`
- `Arg::min_values(2)`
- `Arg::max_values(20)`
- `Arg::takes_value(true)`
These have now all been collapsed into `Arg::num_args` which accepts both
single values and ranges of values. `num_args` controls how many raw arguments
on the command line will be captured as values per occurrence and independent
of value delimiters.
See [Issue 2688](https://github.com/clap-rs/clap/issues/2688) for more background.
**Polishing Help**
Clap strives to give a polished CLI experience out of the box with little
ceremony. With some feedback that has accumulated over time, we took this
release as an opportunity to re-evaluate our `--help` output to make sure it is
meeting that goal.
In doing this evaluation, we wanted to keep in mind:
- Whether other CLIs had ideas that make sense to apply
- Providing an experience that fits within the rest of applications and works across all shells
Before:
```
git
A fictional versioning CLI
USAGE:
git <SUBCOMMAND>
OPTIONS:
-h, --help Print help information
SUBCOMMANDS:
add adds things
clone Clones repos
help Print this message or the help of the given subcommand(s)
push pushes things
stash
```
After:
```
A fictional versioning CLI
Usage: git <COMMAND>
Commands:
clone Clones repos
push pushes things
add adds things
stash
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help information
```
- name/version header was removed because we couldn't justify the space it occupied when
- Usage already includes the name
- `--version` is available for showing the same thing (if the program has a version set)
- Usage was dropped to one line to save space
- Focus is put on the subcommands
- Headings are now Title case
- The more general term "command" is used rather than being explicit about being "subcommands"
- The output is more dense with the expectation that it won't affect legibility but will allow more content
- We've moved to a more neutral palette for highlighting elements (not highlighted above)
In talking to users, we found some that liked clap's `man`-like experience.
When deviating from this, we are making the assumption that those are more
power users and that the majority of users wouldn't look as favorably on being
consistent with `man`.
See [Issue 4132](https://github.com/clap-rs/clap/issues/4132) for more background.
**More Dynamicism**
Clap's API has focused on `&str` for performance but this can make
dealing with owned data difficult, like `#[arg(default_value_t)]` generating a
String from the default value.
Additionally, to avoid `ArgMatches` from borrowing (and for some features we
decided to forgo), clap took the `&str` argument IDs and hashed them. This
prevented us from providing a usable API for iterating over existing arguments.
Now clap has switched to a string newtype that gives us the flexibility to
decide whether to use `&'static str`, `Cow<'static, str>` for fast dynamic behavior, or
`Box<str>` for dynamic behavior with small binary size.
As an extension of that work, you can now call `ArgMatches::ids` to iterate
over the arguments and groups that were found when parsing. The newtype `Id`
was used to prevent some classes of bugs and to make it easier to understand
when opaque Ids are used vs user-visible strings.
**Clearing Out Deprecations**
Instead of doing all development on clap 4.0.0, we implemented a lot of new features during clap 3's development, deprecating the old API while introducing the new API, including:
- Replacing the implicit behavior for args when parsing them with `ArgAction`
- Replacing various one-off forms of value validation with the `ValueParser` API
- Allowing derives to automatically do the right thing for `PathBuf` (allowing invalid UTF-8)
- Replacing `AppSettings` and `ArgSettings` enums with getters/setters
- Clarifying terms and making them more consistent
### Migrating
Steps:
0. [Upgrade to v3](https://github.com/clap-rs/clap/blob/v3-master/CHANGELOG.md#migrating) if you haven't already
1. Add CLI tests (including example below), `-h` and `--help` output at a minimum (recommendation: [trycmd](https://docs.rs/trycmd/) for snapshot testing)
2. *If using Builder API*: Explicitly set the `arg.action(ArgAction::...)` on each argument (`StoreValue` for options and `IncOccurrences` for flags)
3. Run `cargo check --features clap/deprecated` and resolve all deprecation warnings
4. Upgrade to v4
5. Update feature flags
- *If `default-features = false`*, run `cargo add clap -F help,usage,error-context`
- Run `cargo add clap -F wrap_help` unless you want to hard code line wraps
6. Resolve compiler errors
7. Resolve behavior changes (see "subtle changes" under BREAKING CHANGES)
8. *At your leisure:* resolve new deprecation notices
Example test (derive):
```rust
#[derive(clap::Parser)]
struct Cli {
...
}
#[test]
fn verify_cli() {
use clap::CommandFactory;
Cli::command().debug_assert()
}
```
Example test (builder):
```rust
fn cli() -> clap::Command {
...
}
#[test]
fn verify_cli() {
cli().debug_assert();
}
```
Note: the idiomatic / recommended way of specifying different types of args in the Builder API has changed:
Before
```rust
.arg(Arg::new("flag").long("flag")) # --flag
.arg(Arg::new("option").long("option").takes_value(true)) # --option <option>
```
After:
```rust
.arg(Arg::new("flag").long("flag").action(ArgAction::SetTrue)) # --flag
.arg(Arg::new("option").long("option")) # --option <option>
```
In particular, `num_args` (the replacement for `takes_value`) will default appropriately
from the `ArgAction` and generally only needs to be set explicitly for the
other `num_args` use cases.
### Breaking Changes
Subtle changes (i.e. compiler won't catch):
- `arg!` now sets one of (#3795):
- `ArgAction::SetTrue`, requiring `ArgMatches::get_flag` instead of `ArgMatches::is_present`
- `ArgAction::Count`, requiring `ArgMatches::get_count` instead of `ArgMatches::occurrences_of`
- `ArgAction::Set`, requiring `ArgMatches::get_one` instead of `ArgMatches::value_of`
- `ArgAction::Append`, requiring `ArgMatches::get_many` instead of `ArgMatches::values_of`
- `ArgAction::Set`, `ArgAction::SetTrue`, and `Arg::Action::SetFalse` now
conflict by default to be like `ArgAction::StoreValue` and
`ArgAction::IncOccurrences`, requiring `cmd.args_override_self(true)` to override instead (#4261)
- By default, an `Arg`s default action is `ArgAction::Set`, rather than `ArgAction::IncOccurrence` to reduce confusing magic through consistency (#2687, #4032, see also #3977)
- `mut_arg` can no longer be used to customize help and version arguments, instead disable them (`Command::disable_help_flag`, `Command::disable_version_flag`) and provide your own (#4056)
- Removed lifetimes from `Command`, `Arg`, `ArgGroup`, and `PossibleValue`, assuming `'static`. `string` feature flag will enable support for `String`s (#1041, #2150, #4223)
- `arg!(--flag <value>)` is now optional, instead of required. Add `.required(true)` at the end to restore the original behavior (#4206)
- Added default feature flags, `help`, `usage` and `error-context`, requiring adding them back in if `default-features = false` (#4236)
- *(parser)* Always fill in `""` argument for external subcommands to make it easier to distinguish them from built-in commands (#3263)
- *(parser)* Short flags now have higher precedence than hyphen values with `Arg::allow_hyphen_values`, to be consistent with `Command::allow_hyphen_values` (#4187)
- *(parser)* `Arg::value_terminator` must be its own argument on the CLI rather than being in a delimited list (#4025)
- *(help)* Line wrapping of help is now behind the existing `wrap_help` feature flag, either enable it or hard code your wraps (#4258)
- *(help)* Make `DeriveDisplayOrder` the default and removed the setting. To sort help, set `next_display_order(None)` (#2808)
- *(help)* Subcommand display order respects `Command::next_display_order` instead of `DeriveDisplayOrder` and using its own initial display order value (#2808)
- *(help)* Subcommands are now listed before arguments. To get the old behavior, see `Command::help_template` (#4132)
- *(help)* Help headings are now title cased, making any user-provided help headings inconsistent. To get the old behavior, see `Command::help_template`, `Arg::help_heading`, and `Command::subcommand_help_heading` (#4132)
- *(help)* "Command" is used as the section heading for subcommands and `COMMAND` for the value name. To get the old behavior, see `Command::subcommand_help_heading` and `Arg::subcommand_value_name` (#4132, #4155)
- *(help)* Whitespace in help output is now trimmed to ensure consistency regardless of how well a template matches the users needs. (#4132, #4156)
- *(help)* name/version/author are removed by default from help output. To get the old behavior, see `Command::help_template`. (#4132, #4160)
- *(help)* Indentation for second-line usage changed. (#4132, #4188)
- *(env)* Parse `--help` and `--version` like any `ArgAction::SetTrue` flag (#3776)
- *(derive)* Leave `Arg::id` as `verbatim` casing, requiring updating of string references to other args like in `conflicts_with` or `requires` (#3282)
- *(derive)* Doc comments for `ValueEnum` variants will now show up in `--help` (#3312)
- *(derive)* When deriving `Args`, and `ArgGroup` is created using the type's name, reserving it for future use (#2621, #4209)
- *(derive)* `next_help_heading` can now leak out of a `#[clap(flatten)]`, like all other command settings (#4222)
Easier to catch changes:
- Looking up a group in `ArgMatches` now returns the arg `Id`s, rather than the values to reduce overhead and offer more flexibility. (#4072)
- Changed `Arg::number_of_values` (average-across-occurrences) to `Arg::num_args` (per-occurrence) (raw CLI args, not parsed values) (#2688, #4023)
- `num_args(0)` no longer implies `takes_value(true).multiple_values(true)` (#4023)
- `num_args(1)` no longer implies `multiple_values(true)` (#4023)
- Does not check default or env values, only what the user explicitly passes in (#4025)
- No longer terminates on delimited values (#4025)
- Replace `Arg::min_values` (across all occurrences) with `Arg::num_args(N..)` (per occurrence) to reduce confusion over different value count APIs (#4023)
- Replace `Arg::max_values` (across all occurrences) with `Arg::num_args(1..=M)` (per occurrence) to reduce confusion over different value count APIs (#4023)
- Replace `Arg::multiple_values(true)` with `Arg::num_args(1..)` and `Arg::multiple_values(false)` with `Arg::num_args(0)` to reduce confusion over different value count APIs (#4023)
- Replace `Arg::takes_value(true)` with `Arg::num_args(1)` and `Arg::takes_value(false)` with `Arg::num_args(0)` to reduce confusion over different value count APIs
- Remove `Arg::require_value_delimiter`, either users could use `Arg::value_delimiter` or implement a custom parser with `TypedValueParser` as it was mostly to make `multiple_values(true)` act like `multiple_values(false)` and isn't needed anymore (#4026)
- `Arg::new("help")` and `Arg::new("version")` no longer implicitly disable the
built-in flags and be copied to all subcommands, instead disable
the built-in flags (`Command::disable_help_flag`,
`Command::disable_version_flag`) and mark the custom flags as `global(true)`. (#4056)
- `Arg::short('h')` no longer implicitly disables the short flag for help,
instead disable
the built-in flags (`Command::disable_help_flag`,
`Command::disable_version_flag`) provide your own `Arg::new("help").long("help").action(ArgAction::Help).global(true)`. (#4056)
- `ArgAction::SetTrue` and `ArgAction::SetFalse` now prioritize `Arg::default_missing_value` over their standard behavior (#4000)
- Changed `Arg::requires_ifs` and `Arg::default_value*_ifs*` to taking an `ArgPredicate`, removing ambiguity with `None` when accepting owned and borrowed types (#4084)
- Removed `PartialEq` and `Eq` from `Command` so we could change external subcommands to use a `ValueParser` (#3990)
- Various `Arg`, `Command`, and `ArgGroup` calls were switched from accepting `&[]` to `[]` via `IntoIterator` to be more flexible (#4072)
- `Arg::short_aliases` and other builder functions that took `&[]` need the `&` dropped (#4081)
- `ErrorKind` and `Result` moved into the `error` module
- `ErrorKind::EmptyValue` replaced with `ErrorKind::InvalidValue` to remove an unnecessary special case (#3676, #3968)
- `ErrorKind::UnrecognizedSubcommand` replaced with `ErrorKind::InvalidSubcommand` to remove an unnecessary special case (#3676)
- Changed the default type of `allow_external_subcommands` from `String` to `OsString` as that is less likely to cause bugs in user applications (#3990)
- *(help)* `Command::render_usage` now returns a `StyledStr` (#4248)
- *(derive)* Changed the default for arguments from `parse` to `value_parser`, removing `parse` support (#3827, #3981)
- `#[clap(value_parser)]` and `#[clap(action)]` are now redundant
- *(derive)* `subcommand_required(true).arg_required_else_help(true)` is set instead of `SubcommandRequiredElseHelp` to give more meaningful errors when subcommands are missing and to reduce redundancy (#3280)
- *(derive)* Remove `arg_enum` attribute in favor of `value_enum` to match the new name (we didn't have support in v3 to mark it deprecated) (#4127)
- *(parser)* Assert when the CLI looksup an unknown args when external subcommand support is enabled to help catch bugs (#3703)
- *(assert)* Sometimes `Arg::default_missing_value` didn't require `num_args(0..=N)`, now it does (#4023)
- *(assert)* Leading dashes in `Arg::long` are no longer allowed (#3691)
- *(assert)* Disallow more `value_names` than `num_args` (#2695)
- *(assert)* Always enforce that version is specified when the `ArgAction::Version` is used
- *(assert)* Add missing `#[track_caller]`s to make it easier to debug asserts
- *(assert)* Ensure `overrides_with` IDs are valid
- *(assert)* Ensure no self-`overrides_with` now that Actions replace it
- *(assert)* Ensure subcommand names are not duplicated
- *(assert)* Assert on `mut_arg` receiving an invalid arg ID or `mut_subcommand` receiving an invalid command name
### Compatibility
MSRV is now 1.60.0
Deprecated
- `Arg::use_value_delimiter` in favor of `Arg::value_delimiter` to avoid having multiple ways of doing the same thing
- `Arg::requires_all` in favor of `Arg::requires_ifs` now that it takes an `ArgPredicate` to avoid having multiple ways of doing the same thing
- `Arg::number_of_values` in favor of `Arg::num_args` to clarify semantic differences
- `default_value_os`, `default_values_os`, `default_value_if_os`, and `default_value_ifs_os` as the non `_os` variants now accept either a `str` or an `OsStr` (#4141)
- `Arg::env_os` in favor of `Arg::env`
- `Command::dont_collapse_args_in_usage` is now the default (#4151)
- `Command::trailing_var_arg` in favor of `Arg::trailing_var_arg` to make it clearer which arg it is meant to apply to (#4187)
- `Command::allow_hyphen_values` in favor of `Arg::allow_hyphen_values` to make it clearer which arg it is meant to apply to (#4187)
- `Command::allow_negative_numbers` in favor of `Arg::allow_negative_numbers` to make it clearer which arg it is meant to apply to (#4187)
- *(help)* Deprecated `Command::write_help` and `Command::write_long_help` in favor of `Command::render_help` and `Command::render_long_help` (#4248)
- *(derive)* `structopt` and `clap` attributes in favor of the more specific `command`, `arg`, and `value` to open the door for [more features](https://github.com/clap-rs/clap/issues/1807) and [clarify relationship to the builder](https://github.com/clap-rs/clap/discussions/4090) (#1807, #4180)
- *(derive)* `#[clap(value_parser)]` and `#[clap(action)]` defaulted attributes (its the default) (#3976)
Behavior Changes
- *(help)* With `wrap_help` feature, if the terminal size cannot be determined, `LINES` and `COLUMNS` variables are used (#4186)
### Features
- `Arg::num_args` now accepts ranges, allowing setting both the minimum and maximum number of values per occurrence (#2688, #4023)
- Allow non-bool `value_parser`s for `ArgAction::SetTrue` / `ArgAction::SetFalse` (#4092)
- Add `From<&OsStr>`, `From<OsString>`, `From<&str>`, and `From<String>` to `value_parser!` (#4257)
- Allow resetting most builder methods
- Can now pass runtime generated data to `Command`, `Arg`, `ArgGroup`, `PossibleValue`, etc without managing lifetimes with the `string` feature flag (#2150, #4223)
- New default `error-context`, `help` and `usage` feature flags that can be turned off for smaller binaries (#4236)
- Added `StyledStr::ansi()` to `Display` with ANSI escape codes (#4248)
- *(error)* `Error::apply` for changing the formatter for dropping binary size (#4111)
- *(error)* `Error::render`for formatting the error into a `StyledStr`
- *(help)* Show `PossibleValue::help` in long help (`--help`) (#3312)
- *(help)* New `{tab}` variable for `Command::help_template` (#4161)
- *(help)* `Command::render_help` and `Command::render_long_help` for formatting the error into a `StyledStr` (#3873, #4248)
- *(help)* `Command::render_usage` now returns a `StyledStr` (#4248)
### Fixes
- Verify `required` is not used with conditional required settings (#3660)
- Replaced `cmd.allow_invalid_for_utf8_external_subcommands` with `cmd.external_subcommand_value_parser` (#3733)
- `Arg::default_missing_value` now applies per occurrence rather than if a value is missing across all occurrences (#3998)
- `arg!(--long [value])` to accept `0..=1` per occurrence rather than across all occurrences, making it safe to use with `ArgAction::Append` (#4001)
- Allow `OsStr`s for `Arg::{required_if_eq,required_if_eq_any,required_if_eq_all}` (#4084)
- *(help)* With `wrap_help` feature, if the terminal size cannot be determined, `LINES` and `COLUMNS` variables are used (#4186)
- *(help)* Use `Command::display_name` in the help title rather than `Command::bin_name`
- *(help)* Show when a flag is `ArgAction::Count` by adding an `...` (#4003)
- *(help)* Use a more neutral palette for coloring (#4132, #4117)
- *(help)* Don't rely on ALL CAPS for help headers (#4132, #4123)
- *(help)* List subcommands first, focusing the emphasis on them (#4132, #4125)
- *(help)* Do not include global args in `cmd help help` (#4131)
- *(help)* Use `[positional]` in list when relevant (#4144)
- *(help)* Show all `[positional]` in usage (#4151)
- *(help)* Polish up subcommands by referring to them as commands (#4132, #4155)
- *(help)* Trim extra whitespace to avoid artifacts from different uses of templates (#4132, #4156)
- *(help)* Hint to the user the difference between `-h` / `--help` when applicable (#4132, #4159)
- *(help)* Shorten help by eliding name/version/author (#4132, #4160)
- *(help)* When short help is long enough to activate `next_line_help`, don't add blank lines (#4132, #4190)
- *(help)* Make help output more dense (reducing horizontal whitespace) (#4132, #4192)
- *(help)* Separate subcommand flags with "," like option flags (#4232, #4235)
- *(help)* Quote the suggested help flag (#4220)
- *(version)* Use `Command::display_name` rather than `Command::bin_name` (#3966)
- *(parser)* Always fill in `""` argument for external subcommands (#3263)
- *(parser)* Short flags now have higher precedence than hyphen values with `Arg::allow_hyphen_values`, like `Command::allow_hyphen_values` (#4187)
- *(parser)* Prefer `InvalidSubcommand` over `UnknownArgument` in more cases (#4219)
- *(derive)* Detect escaped external subcommands that look like built-in subcommands (#3703)
- *(derive)* Leave `Arg::id` as `verbatim` casing (#3282)
- *(derive)* Default to `#[clap(value_parser, action)]` instead of `#[clap(parse)]` (#3827)
## [3.2.18] - 2022-08-29
### Fixes
- *(help)* `Command::print_help` now respects `Command::colored_help`
- *(derive)* Improved error messages
## [3.2.17] - 2022-08-12
### Fixes
- *(derive)* Expose `#[clap(id = ...)]` attribute to match Arg's latest API
## [3.2.16] - 2022-07-30
### Fixes
- Ensure required arguments appear in errors when they are also members of a group (#4004)
## [3.2.15] - 2022-07-25
### Features
- *(derive)* New `default_values_t` and `default_values_os_t` attributes
## [3.2.14] - 2022-07-21
### Fixes
- A `multiple_values` positional followed by another positional now works with multiple flags
## [3.2.13] - 2022-07-19
### Documentation
- Pulled in tutorials, cookbook, and derive reference into rustdoc
## [3.2.12] - 2022-07-14
### Fixes
- Allow an arg to declare a conflict with a group
## [3.2.11] - 2022-07-13
### Features
- Added `Arg::get_all_short_aliaes` and `Arg::get_all_aliases`
## [3.2.10] - 2022-07-12
### Fixes
- Loosen lifetime on `Command::mut_subcommand`
## [3.2.8] - 2022-06-30
### Features
- Added `Command::mut_subcommand` to mirror `Command::mut_arg`
## [3.2.7] - 2022-06-28
### Fixes
- Global arguments should override env-sourced arguments
## [3.2.6] - 2022-06-21
### Fixes
- Don't panic when parsing `--=`
## [3.2.5] - 2022-06-15
### Fixes
- *(derive)* Fix regression with `#[clap(default_value_os_t ...)]` introduced in v3.2.3
## [3.2.4] - 2022-06-14
### Fixes
- *(derive)* Provide more clearer deprecation messages for `#[clap(parse)]` attribute (#3832)
## [3.2.3] - 2022-06-14
### Fixes
- Moved deprecations to be behind the `deprecated` Cargo.toml feature (#3830)
- For now, it is disabled by default though we are considering enabling it by
default as we release the next major version to help draw attention to the
deprecation migration path
## [3.2.2] - 2022-06-14
### Fixes
- *(derive)* Improve the highlighted code for deprecation warnings
**gated behind `unstable-v4`**
- *(derive)* Default to `#[clap(value_parser, action)]` instead of `#[clap(parse)]` (#3827)
## [3.2.1] - 2022-06-13
## [3.2.0] - 2022-06-13
### Compatibility
MSRV is now 1.56.0 (#3732)
Behavior
- Defaults no longer satisfy `required` and its variants (#3793)
- When misusing `ArgMatches::value_of` and friends, debug asserts were turned into panics
Moving (old location deprecated)
- `clap::{PossibleValue, ValueHint}` to `clap::builder::{PossibleValue, ValueHint}`
- `clap::{Indices, OsValues, ValueSource, Values}` to `clap::parser::{Indices, OsValues, ValueSource, Values}`
- `clap::ArgEnum` to `clap::ValueEnum` (#3799)
Replaced
- `Arg::allow_invalid_utf8` with `Arg::value_parser(value_parser!(PathBuf))` (#3753)
- `Arg::validator` / `Arg::validator_os` with `Arg::value_parser` (#3753)
- `Arg::validator_regex` with users providing their own `builder::TypedValueParser` (#3756)
- `Arg::forbid_empty_values` with `builder::NonEmptyStringValueParser` / `builder::PathBufValueParser` (#3753)
- `Arg::possible_values` with `Arg::value_parser([...])`, `builder::PossibleValuesParser`, or `builder::EnumValueParser` (#3753)
- `Arg::max_occurrences` with `arg.action(ArgAction::Count).value_parser(value_parser!(u8).range(..N))` for flags (#3797)
- `Arg::multiple_occurrences` with `ArgAction::Append` or `ArgAction::Count` though positionals will need `Arg::multiple_values` (#3772, #3797)
- `Command::args_override_self` with `ArgAction::Set` (#2627, #3797)
- `AppSettings::NoAutoVersion` with `ArgAction` or `Command::disable_version_flag` (#3800)
- `AppSettings::NoHelpVersion` with `ArgAction` or `Command::disable_help_flag` / `Command::disable_help_subcommand` (#3800)
- `ArgMatches::{value_of, value_of_os, value_of_os_lossy, value_of_t}` with `ArgMatches::{get_one,remove_one}` (#3753)
- `ArgMatches::{values_of, values_of_os, values_of_os_lossy, values_of_t}` with `ArgMatches::{get_many,remove_many}` (#3753)
- `ArgMatches::is_valid_arg` with `ArgMatches::{try_get_one,try_get_many}` (#3753)
- `ArgMatches::occurrences_of` with `ArgMatches::value_source` or `ArgAction::Count` (#3797)
- `ArgMatches::is_present` with `ArgMatches::contains_id` or `ArgAction::SetTrue` (#3797)
- `ArgAction::StoreValue` with `ArgAction::Set` or `ArgAction::Append` (#3797)
- `ArgAction::IncOccurrences` with `ArgAction::SetTrue` or `ArgAction::Count` (#3797)
- *(derive)* `#[clap(parse(...))]` replaced with: (#3589, #3794)
- For default parsers (no `parse` attribute), deprecation warnings can be
silenced by opting into the new behavior by adding either `#[clap(action)]`
or `#[clap(value_parser)]` (ie requesting the default behavior for these
attributes). Alternatively, the `unstable-v4` feature changes the default
away from `parse` to `action`/`value_parser`.
- For `#[clap(parse(from_flag))]` replaced with `#[clap(action = ArgAction::SetTrue)]` (#3794)
- For `#[clap(parse(from_occurrences))]` replaced with `#[clap(action = ArgAction::Count)]` though the field's type must be `u8` (#3794)
- For `#[clap(parse(from_os_str)]` for `PathBuf`, replace it with
`#[clap(value_parser)]` (as mentioned earlier this will call
`value_parser!(PathBuf)` which will auto-select the right `ValueParser`
automatically).
- For `#[clap(parse(try_from_str = ...)]`, replace it with `#[clap(value_parser = ...)]`
- For most other cases, a type implementing `TypedValueParser` will be needed and specify it with `#[clap(value_parser = ...)]`
### Features
- Parsed, typed arguments via `Arg::value_parser` / `ArgMatches::{get_one,get_many}` (#2683, #3732)
- Several built-in `TypedValueParser`s available with an API open for expansion
- `value_parser!(T)` macro for selecting a parser for a given type (#3732) and open to expansion via the `ValueParserFactory` trait (#3755)
- `[&str]` is implicitly a value parser for possible values
- All `ArgMatches` getters do not assume required arguments (#2505)
- Add `ArgMatches::remove_*` variants to transfer ownership
- Add `ArgMatches::try_*` variants to avoid panics for developer errors (#3621)
- Add a `get_raw` to access the underlying `OsStr`s
- `PathBuf` value parsers imply `ValueHint::AnyPath` for completions (#3732)
- Explicit control over parsing via `Arg::action` (#3774)
- `ArgAction::StoreValue`: existing `takes_value(true)` behavior
- `ArgAction::IncOccurrences`: existing `takes_value(false)` behavior
- `ArgAction::Help`: existing `--help` behavior
- `ArgAction::Version`: existing `--version` behavior
- `ArgAction::Set`: Overwrite existing values (like `Arg::multiple_occurrences` mixed with `Command::args_override_self`) (#3777)
- `ArgAction::Append`: like `Arg::multiple_occurrences` (#3777)
- `ArgAction::SetTrue`: Treat `--flag` as `--flag=true` (#3775)
- Implies `Arg::default_value("false")` (#3786)
- Parses `Arg::env` via `Arg::value_parser`
- `ArgAction::SetFalse`: Treat `--flag` as `--flag=false` (#3775)
- Implies `Arg::default_value("true")` (#3786)
- Parses `Arg::env` via `Arg::value_parser`
- `ArgAction::Count`: Treat `--flag --flag --flag` as `--flag=1 --flag=2 --flag=3` (#3775)
- Implies `Arg::default_value("0")` (#3786)
- Parses `Arg::env` via `Arg::value_parser`
- *(derive)* Opt-in to new `Arg::value_parser` / `Arg::action` with either `#[clap(value_parser)]` (#3589, #3742) / `#[clap(action)]` attributes (#3794)
- Default `ValueParser` is determined by `value_parser!` (#3199, #3496)
- Default `ArgAction` is determine by a hard-coded lookup on the type (#3794)
- `Command::multicall` is now stable for busybox-like programs and REPLs (#2861, #3684)
- `ArgMatches::{try_,}contains_id` for checking if there are values for an argument that mirrors the new `get_{one,many}` API
### Fixes
- Don't correct argument id in `default_value_ifs_os`(#3815)
*parser*
- Set `ArgMatches::value_source` and `ArgMatches::occurrences_of` for external subcommands (#3732)
- Use value delimiter for `Arg::default_missing_values` (#3761, #3765)
- Split`Arg::default_value` / `Arg::env` on value delimiters independent of whether `--` was used (#3765)
- Allow applying defaults to flags (#3294, 3775)
- Defaults no longer satisfy `required` and its variants (#3793)
## [3.1.18] - 2022-05-10
### Fixes
- Fix deprecated `arg_enum!` for users migrating to clap3 (#3717)
- Verify all `required_unless_present_all` arguments exist
- Verify group members exist before processing group members (#3711)
- *(help)* Use `...` when not enough `value_names` are supplied
**gated behind `unstable-v4`**
- Verify `required` is not used with conditional required settings (#3660)
- Disallow more `value_names` than `number_of_values` (#2695)
- *(parser)* Assert on unknown args when using external subcommands (#3703)
- *(parser)* Always fill in `""` argument for external subcommands (#3263)
- *(derive)* Detect escaped external subcommands that look like built-in subcommands (#3703)
- *(derive)* Leave `Arg::id` as `verbatim` casing (#3282)
## [3.1.17] - 2022-05-06
### Fixes
- Allow value names for `arg!` macro to have dashes when quoted, like longs
## [3.1.16] - 2022-05-06
### Fixes
- *(parser)* `Arg::exclusive` overrides `Arg::required`, like other conflicts
- *(error)* Don't duplicate arguments in usage
- *(error)* Don't show hidden arguments in conflict error usage
- *(help)* New `help_template` variable `{name}` to fix problems with `{bin}`
- *(help)* Don't wrap URLs
**gated behind `unstable-v4`**
- Leading dashes in `Arg::long` are no longer allowed
- *(help)* Use `Command::display_name` in the help title rather than `Command::bin_name`
## [3.1.15] - 2022-05-02
### Fixes
- *(error)* Render actual usage for unrecognized subcommands
- *(multicall)* Improve bad command error
- *(multicall)* Always require a multicall command
- *(multicall)* Disallow arguments on multicall parent command
- *(multicall)* More consistent with rest of clap errors
## [3.1.14] - 2022-05-01
### Fixes
- Panic when calling `Command::build` with a required positional argument nested several layers in subcommands
## [3.1.13] - 2022-04-30
### Fixes
- Help subcommand and `Command::write_help` now report required arguments in usage in more circumstances
- Unknown subcommand for help subcommand flag now reports an error with more context
- More details reported when using `debug` feature
- Allow disabling `color` feature with `debug` feature enabled
## [3.1.12] - 2022-04-22
### Fixes
- Regression in 3.1.11 where the (output) streams were crossed
## [3.1.11] - 2022-04-22
### Fixes
- Implied conflicts override `Arg::required`, making the behavior consistent with how we calculate conflicts for error reporting
- Members of a mutually exclusive `ArgGroup` override `Arg::required`, making the behavior consistent with how we calculate conflicts for error reporting
- `Arg::overrides_with` always override `Arg::required`, not just when the parser processes an override
## [3.1.10] - 2022-04-19
### Features
- Expose `Command::build` for custom help generation or other command introspection needs
## [3.1.9] - 2022-04-15
### Fixes
- Pin the `clap_derive` version so a compatible version is always used with `clap`
## [3.1.8] - 2022-04-01
### Fixes
- Add `Debug` impls to more types
## [3.1.7] - 2022-03-31
### Fixes
- *(derive)* Abort, rather than ignore, when deriving `ArgEnum` with non-unit unskipped variants
## [3.1.6] - 2022-03-07
### Fixes
- Don't panic when validating delimited defaults (#3541)
- Make it clearer that `cargo` feature is needed
- Documentation improvements
## [3.1.5] - 2022-03-02
### Fixes
- Dependency upgrade
## [3.1.4] - 2022-03-02
### Features
- *(help)* Show `PossibleValue::help` in long help (`--help`) **(gated behind `unstable-v4`)** (#3312)
## [3.1.3] - 2022-02-28
### Fixes
- Don't panic when validating delimited defaults (#3514)
## [3.1.2] - 2022-02-23
### Fixes
- *(derive)* Allow other attribute with a subcommand that has subcommands
### Documentation
- *(examples)* List example topics
- *(derive)* Clarify syntax and relation to builder API
## [3.1.1] - 2022-02-21
### Fixes
- Track caller for `ArgMatches` assertions so the user more easily sees where they need to fix the call
## [3.1.0] - 2022-02-16
### Compatibility
Changes in behavior of note that are not guaranteed to be compatible across releases:
- *(help)* `help` subcommand shows long help like `--help`, rather than short help (`-h`), deprecated `clap::AppSettings::UseLongFormatForHelpSubcommand` (#3440)
- *(help)* Pacman-style subcommands are now ordered the same as usage errors (#3470)
- *(help)* Pacman-style subcommands use standard alternate syntax in usage (#3470)
### Deprecations
- `clap::Command` is now preferred over `clap::App` (#3089 in #3472)
- `clap::command!` is now preferred over `clap::app_from_crate` (#3089 in #3474)
- `clap::CommandFactory::command` is now preferred over `clap::IntoApp::into_app` (#3089 in #3473)
- *(help)* `help` subcommand shows long help like `--help`, rather than short help (`-h`), deprecated `clap::AppSettings::UseLongFormatForHelpSubcommand` (#3440)
- *(error)* Deprecate `clap::AppSettings::WaitOnError`, leaving it to the user to implement
- *(validation)* `clap::Command::subcommand_required(true).arg_required_else_help(true)` is now preferred over `clap::AppSettings::SubcommandRequiredElseHelp` (#3280)
- *(builder)* `clap::AppSettings` are nearly all deprecated and replaced with builder methods and getters (#2717)
- *(builder)* `clap::ArgSettings` is deprecated and replaced with builder methods and getters (#2717)
- *(builder)* `clap::Arg::id` and `clap::ArgGroup::id` are now preferred over `clap::Arg::name` and `clap::ArgGroup::name` (#3335)
- *(help)* `clap::Command::next_help_heading` is now preferred over `clap::Command::help_heading` (#1807, #1553)
- *(error)* `clap::error::ErrorKind` is now preferred over `clap::ErrorKind` (#3395)
- *(error)* `clap::Error::kind()` is now preferred over `clap::Error::kind`
- *(error)* `clap::Error::context()` is now preferred over `clap::Error::info` (#2628)
Note: All items deprecated in 3.0.0 are now hidden in the documentation. (#3458)
### Features
- *(matches)* Add `clap::ArgMatches::value_source` to determine what insert the value (#1345)
- *(help)* Override derived display order with `clap::Command::next_display_order` (#1807)
- *(error)* Show possible values when an argument doesn't have a value (#3320)
- *(error)* New `clap::Error::context` API to open the door for fully-custom error messages (#2628)
- *(error)* `clap::error::ErrorKind` now implements `Display`
### Fixes
- *(builder)* Some functions were renamed for consistency and fixing spelling issues
- *(builder)* Allow `clap::Command::color` to override previous calls (#3449)
- *(parse)* Propagate globals with multiple subcommands (#3428)
- *(validation)* Give `ArgRequiredElseHelp` precedence over `SubcommandRequired` (#3456)
- *(validation)* Default values no longer count as "present" for conflicts, requires, `clap::Command::arg_required_else_help`, etc (#3076, #1264)
- *(assert)* Report invalid defaults (#3202)
- *(help)* Clarify how to handle `-h` conflicts (#3403)
- *(help)* Make it easier to debug the addition of help flags (#3425)
- *(help)* Pacman-style subcommands are now separated with spaces (#3470)
- *(help)* Pacman-style subcommands are now ordered the same as usage errors (#3470)
- *(help)* Pacman-style subcommands use standard alternate syntax in usage (#3470)
- *(error)* Be consistent in showing of required attributes between errors / usage (#3390)
- *(error)* Show user's order of possible values, like in `--help` (#1549)
- *(error)* Allow customizing error type in `clap::error::Result` (#3395)
### Performance
- *(error)* Reduced stack size of `clap::Error` (#3395)
### Documentation
- *(builder)* Correct data take accepted for `clap::Arg::validator`
- *(derive)* Clarify `parse` attribute
- *(tutorial)* Demonstrate custom parsing
- *(example)* Consistently list out required feature flags (#3448)
## [3.0.14] - 2022-02-01
### Features
- Added `ArgMatches::args_present()` to check if any args are present
- Added `Error::kind()` as we work to deprecate direct member access for `Error`
- Added `App::get_version`
- Added `App::get_long_version`
- Added `App::get_author`
- Added `App::get_subcommand_help_heading`
- Added `App::get_subcommand_value_name`
- Added `App::get_after_help`
- Added `App::get_after_long_help`
### Performance
- Misc binary size reductions
## [3.0.13] - 2022-01-26
### Fixes
- Show optional flag values wrapped in `[]`
## [3.0.12] - 2022-01-24
### Features
- *(derive)* Support for `default_value_os_t`
## [3.0.11] - 2022-01-24
### Fixes
- Ensure conflicts work when they target a group with a default value
## [3.0.10] - 2022-01-18
### Fixes
- Resolve `panic!` from v3.0.8 when using `global_setting(PropagateVersion)`.
## [3.0.9] - 2022-01-17
### Features
- Added `App::find_subcommand_mut`
## [3.0.8] - 2022-01-17
### Fixes
- Respected `DisableColoredHelp` on `cmd help help`
- Provide a little more context when completing arguments for `cmd help`
- Provide more context for some asserts
- Small documentation improvements
## [3.0.7] - 2022-01-12
### Fixes
- Shift more asserts from parsing to `App` building (ie will now run in `App::debug_assert`)
**derive**
- Documentation fixes
## [3.0.6] - 2022-01-10
### Fixes
**derive**
- Don't assume user does `use clap::ArgEnum` (#3277)
- Documentation fixes
## [3.0.5] - 2022-01-05
### Fixes
- Provide hack to workaround [inability to detect external subcommands aliasing when escaped](https://github.com/clap-rs/clap/issues/3263) (#3264)
**docs:**
- Cleaned up code blocks in tutorials (#3261)
- Clean up quotes in `ArgMatches` asserts
- List correct replacement for deprecated `Parser::from_clap` (#3257)
## [3.0.4] - 2022-01-04
### Features
- For very limited cases, like `cargo`, expose `ArgMatches::is_valid_arg` to avoid panicing on undefined arguments
## [3.0.3] - 2022-01-04
### Fixes
- Specify cause of debug assert failure
## [3.0.2] - 2022-01-04
### Fixes
- Ignore `Last` when checking hyphen values (see #3249 for details)
- Help catch bugs with `#[must_use]`
## [3.0.1] - 2022-01-03
### Fixes
- Don't panic when getting number of values (#3241)
- Don't warn when using `default_value_t` derive attribute with a `Subcommand` (#3245)
Documentation
- Added `name` attribute to `ArgEnum` variant derive reference
## [3.0.0] - 2021-12-31
**Note:** clap v3 has been in development for several years and has changed
hands multiple times. Unfortunately, our changelog might be incomplete,
whether in changes or their motivation.
### Highlights
A special thanks to the maintainers, contributors, beta users, and sponsors who
have helped along this journey, especially kbknapp.
**[StructOpt](https://docs.rs/structopt/) Integration**
[StructOpt](https://docs.rs/structopt/) provides a serde-like declarative
approach to defining your parser. The main benefits we've seen so far from integrating are:
- Tighter feedback between the design of clap and the derives
- More universal traits. Crates exist for common CLI patterns
([example](https://github.com/rust-cli/clap-verbosity-flag))
and we've re-designed the `StructOpt` traits so crates built on clap3 can be
reused not just with other derives but also people using the builder API.
People can even hand implement these so people using the builder API won't
have the pay the cost for derives.
**Custom Help Headings**
Previously, clap automatically grouped arguments in the help as either
`ARGS`, `FLAGS`, `OPTIONS`, and `SUBCOMMANDS`.
You can now override the default group with `Arg::help_heading` and
`App::subcommand_help_heading`. To apply a heading to a series of arguments,
you can set `App::help_heading`.
**Deprecations**
While a lot of deprecations have been added to clean up the API (overloaded
meaning of `Arg::multiple`) or make things more consistent, some particular
highlights are:
- `clap_app!` has been deprecated in favor of the builder API with `arg!` ([clap-rs/clap#2835](https://github.com/clap-rs/clap/issues/2835))
- `Arg::from_usage` has been deprecated in favor of `arg!` ([clap-rs/clap#3087](https://github.com/clap-rs/clap/issues/3087))
- [Porting example](https://github.com/clap-rs/clap/commit/4c4a2b86a08ef9e2d63010aab4909dd5a013dfb0)
- The YAML API has been deprecated in favor the builder or derive APIs ([clap-rs/clap#3087](https://github.com/clap-rs/clap/issues/3087))
### Migrating
**From clap v2**
1. Add CLI tests, `-h` and `--help` output at a minimum (recommendation: [trycmd](https://docs.rs/trycmd/) for snapshot testing)
2. Update your dependency
1. *If you use `no-default-features`:* add the `std` feature
3. Resolve compiler errors
4. Resolve behavior changes
1. Refactor your `App` creation to a function and add a test similar to the one below, resolving any of its assertions
2. Look over the "subtle changes" under BREAKING CHANGES
3. *If using builder:* test your application under various circumstances to see if `ArgMatches` asserts regarding `AllowInvalidUtf8`.
5. *At your leisure:* resolve deprecation notices
Example test:
```rust
fn app() -> clap::App<'static> {
...
}
#[test]
fn verify_app() {
app().debug_assert();
}
```
**From structopt 0.3.25**
<a name="migrate-structopt"></a>
1. Add CLI tests, `-h` and `--help` output at a minimum (recommendation: [trycmd](https://docs.rs/trycmd/) for snapshot testing)
2. Replace your dependency from `structopt = "..."` to `clap = { version = "3.0", features = ["derive"] }`
1. *If you use `no-default-features`:* add the `std` feature
3. Resolve compiler errors, including
1. Update your `use` statements from `structopt` and `structopt::clap` to `clap`
4. Resolve behavior changes
1. Add a test similar to the one below, resolving any of its assertions
2. Look over the "subtle changes" under BREAKING CHANGES
5. *At your leisure:* resolve deprecation notices
Example test:
```rust
#[derive(clap::StructOpt)]
struct Args {
...
}
#[test]
fn verify_app() {
use clap::IntoApp;
Args::into_app().debug_assert()
}
```
**From clap v3.0.0-beta.5**
1. Add CLI tests, `-h` and `--help` output at a minimum (recommendation: [trycmd](https://docs.rs/trycmd/) for snapshot testing)
2. Update your dependency
1. Add in `derive`, `env`, `cargo`, or `unicode` feature flags as needed
3. Resolve compiler errors
1. *If you use `yaml`, `clap_app!`, or usage parser:* revert any changes you made for clap3
2. Change `Arg::about` `Arg::long_about` back to `help` and `long_help` and change `PossibleValue::about` to `help` ([clap-rs/clap#3075](https://github.com/clap-rs/clap/issues/3075))
3. Change `AppSettings::HelpRequired` to `AppSettings::HelpExpected`
4. Change `PossibleValue::hidden` to `PossibleValue::hide`
5. Change `App::subcommand_placeholder` to `App::subcommand_value_name` / `App::subcommand_help_heading`
4. Resolve behavior changes
1. Add the above listed test appropriate for your application and resolve any problems it reports
2. *If using `derive`:* see the structopt breaking changes section for `Vec` changes
3. *If using builder:* test your application under various circumstances to see if `ArgMatches` asserts regarding `AllowInvalidUtf8`.
5. *At your leisure:* resolve deprecation notices
### BREAKING CHANGES
**From clap 2**
Subtle changes (i.e. compiler won't catch):
- `AppSettings::UnifiedHelpMessage` is now default behaviour
- `{flags}` and `{unified}` will assert if present in `App::help_template`
- See [clap-rs/clap#2807](https://github.com/clap-rs/clap/issues/2807)
- `AppSettings::EnableColoredHelp` is now the default behavior but can be
opted-out with `AppSettings::DisableColoredHelp`
([clap-rs/clap#2806](https://github.com/clap-rs/clap/issues/2806))
- `App::override_usage` no longer implies a leading `\t`, allowing multi lined usages
- `Arg::require_equals` no longer implies `ArgSettings::ForbidEmptyValues` ([#2233](https://github.com/clap-rs/clap/issues/2233))
- `Arg::require_delimiter` no longer implies `ArgSettings::TakesValue` and `ArgSettings::UseValueDelimiter` ([#2233](https://github.com/clap-rs/clap/issues/2233))
- `Arg::env`, `Arg::env_os`, `Arg::last`, `Arg::require_equals`, `Arg::allow_hyphen_values`,
`Arg::hide_possible_values`, `Arg::hide_default_value`, `Arg::hide_env_values`,
`Arg::case_insensitive` and `Arg::multiple_values` no longer imply `ArgSettings::TakesValue` ([#2233](https://github.com/clap-rs/clap/issues/2233))
- `ArgMatches::is_present` no longer checks subcommand names
- Some env variable values are now considered false for flags, not just "not-present" ([clap-rs/clap#2539](https://github.com/clap-rs/clap/issues/2539))
- Changed `...`s meaning in usage parser. Before, it always meant `multiple` which is still true for `--option [val]...`. Now `[name]... --option [val]` results in `ArgSettings::MultipleOccurrences`.
- Usage exit code changed from `1` to `2` ([clap-rs/clap#1327](https://github.com/clap-rs/clap/issues/1327))
- Reject `--foo=bar` when `takes_value(false)` ([clap-rs/clap#1543](https://github.com/clap-rs/clap/issues/1543))
- No longer accept an arbitrary number of `-` for long arguments (`-----long`)
Easier to catch changes:
- When using `no-default-features`, you now have to specify the `std` feature (reserved for future work)
- Gated env support behind `env` feature flag
- Impacts `Arg::env`, `Arg::env_os`, `Arg::hide_env_values`, `ArgSettings::HideEnvValues`
- See [clap-rs/clap#2694](https://github.com/clap-rs/clap/pull/2694)
- Gated crate information behind `cargo` feature flag
- Impacts `crate_name!`, `crate_version!`, `crate_authors!`, `crate_description!`, `app_from_crate!`
- `AppSettings::StrictUtf8` is now default behaviour and asserts if
`AppSettings::AllowInvalidUtf8ForExternalSubcommands` and
`ArgSettings::AllowInvalidUtf8` and `ArgMatches::value_of_os` aren't used
together
- `AppSettings::AllowInvalidUtf8` has been removed
- [clap-rs/clap#751](https://github.com/clap-rs/clap/issues/751)
- `Arg::short` and `Arg::value_delimiter` now take a `char` instead of a `&str`
- `ArgMatches` panics on unknown arguments
- Removed `VersionlessSubcommands`, making it the default (see [clap-rs/clap#2812](https://github.com/clap-rs/clap/issues/2812))
- Completion generation has been split out into [clap_complete](./clap_complete).
- Removed `ArgSettings::EmptyValues` in favor of `ArgSettings::ForbidEmptyValues`
- Validator signatures have been loosed:
- `Arg::validator` now takes first argument as `Fn(&str) -> Result<O, E: ToString>` instead of
`Fn(String) -> Result<(), String>`
- `Arg::validator_os` now takes first argument as `Fn(&OsStr) -> Result<O, OsString>` instead of
`Fn(&OsStr) -> Result<(), OsString>`
- `Arg::value_name` now sets, rather than appends (see [clap-rs/clap#2634](https://github.com/clap-rs/clap/issues/2634))
- Upgrade `yaml-rust` from 0.3 to 0.4
- Replaced `ArgGroup::from(BTreeMap)` to `ArgGroup::from(yaml)`
- Replaced `ArgMatches::usage` with `App::generate_usage`
- Replaced `Arg::settings` with `Arg::setting(Setting1 | Setting2)`
- `App` and `Arg` now need only one lifetime
- Removed deprecated `App::with_defaults`, replaced with `app_from_crate`
- Removed deprecated `AppSettings::PropagateGlobalValuesDown` (now the default)
- Some `App` functions, like `App::write_help` now take `&mut self` instead of `&self`
- `Error::message` is now private, use `Error::to_string`
- `Arg::default_value_if`, `Arg::default_value_if_os`, `Arg::default_value_ifs`,
`Arg::default_value_ifs_os` now takes the default value parameter as an option ([clap-rs/clap#1406](https://github.com/clap-rs/clap/issues/1406))
- Changed `App::print_help` & `App::print_long_help` to now return `std::io::Result`
- Changed `App::write_help` & `App::write_long_help` to now return `std::io::Result`
- Changed `Arg::index`, `Arg::number_of_values`, `Arg::min_values`, `Arg::max_values` to taking `usize` instead of u64
- Changed `Error::info` to type `Vec<String>` instead of `Option<Vec<String>>`
- Changed `ArgMatches::subcommand` to now return `Option<(&str, &ArgMatches)>`
- Renamed `ErrorKind::MissingArgumentOrSubcommand` to `ErrorKind::DisplayHelpOnMissingArgumentOrSubcommand`
- Renamed `ErrorKind::HelpDisplayed` to `ErrorKind::DisplayHelp`
- Renamed `ErrorKind::VersionDisplayed` to `ErrorKind::DisplayVersion`
- Added `#[non_exhaustive]` to `clap::{ValueHint, ErrorKind, AppSettings, ArgSettings}` ([clap-rs/clap#3167](https://github.com/clap-rs/clap/pull/3167))
**From structopt 0.3.25**
- By default, the `App` isn't initialized with crate information anymore. Now opt-in via `#[clap(author)]`, `#[clap(about)]`, `#[clap(version)]` ([clap-rs/clap#3034](https://github.com/clap-rs/clap/issues/3034))
- `#[clap(default_value)]` is replaced with `#[clap(default_value_t)]` ([clap-rs/clap#1694](https://github.com/clap-rs/clap/issues/1694))
- Subcommands nested under subcommands now needs a `#[clap(subcommand)]` attribute ([clap-rs/clap#2587](https://github.com/clap-rs/clap/pull/2587))
- `Vec<_>` and `Option<Vec<_>>` have changed from `multiple` to `multiple_occurrences`
On top of the clap 2 changes
### Performance
**From clap 2**
- Split out non-default `unicode` feature flag for faster builds and smaller binaries for ASCII-only CLIs.
- Split out non-default `env` feature flag for faster builds and smaller binaries.
### Features
**From clap 2**
- Integration of `structopt::StructOpt` via `clap::Parser` (requires `derive` feature flag)
- Custom help headings
- `App::help_heading` (apply to all future args)
- `Arg::help_heading` (apply to current arg)
- `App::subcommand_help_heading` along with `App::subcommand_value_name` (apply to subcommands)
- See [clap-rs/clap#805](https://github.com/clap-rs/clap/issues/805)
- `AppSettings::UnifiedHelpMessage` is now default behaviour ([clap-rs/clap#2807](https://github.com/clap-rs/clap/issues/2807))
- Deriving of `ArgEnum` for generating `Arg::possible_values` (requires `derive` feature flag)
- Disable built-in help/version behavior with `AppSettings::NoAutoHelp` and `AppSettings::NoAutoVersion`
- Change an existing arg with new builder method `mut_arg` (particularly helpful for `--help` and `--version`)
- Provide extra context in long help messages (`--help`) with `before_long_help` and `after_long_help` ([clap-rs/clap#1903](https://github.com/clap-rs/clap/issues/1903))
- Detect missing help descriptions via debug asserts by enabling `AppSettings::HelpExpected`
- Aliases for short flags ([clap-rs/clap#1896](https://github.com/clap-rs/clap/issues/1896))
- Validate UTF-8 values, rather than panicing during `ArgMatches::value_of` thanks to `AppSettings::AllowInvalidUtf8ForExternalSubcommands` and `ArgSettings::AllowInvalidUtf8`
- Debug builds will assert when the `ArgMatches` calls do not match the UTF-8 setting.
- See [clap-rs/clap#751](https://github.com/clap-rs/clap/issues/751)
- `clap::PossibleValue` to allow
- Hiding ([clap-rs/clap#2756](https://github.com/clap-rs/clap/issues/2756))
- Completion help for possible values for args ([clap-rs/clap#2731](https://github.com/clap-rs/clap/issues/2731))
- Allow arguments to conflict with all others via `Arg::exclusive` ([clap-rs/clap#1583](https://github.com/clap-rs/clap/issues/1583))
- Validate arguments with a regex (required `regex` feature flag)
- See [clap-rs/clap](https://github.com/clap-rs/clap/issues/1968)
- `Arg::default_missing_value` for cases like `--color[=<WHEN>]` ([clap-rs/clap#1587](https://github.com/clap-rs/clap/pull/1587))
- `clap::App::color` / `clap::ColorChoice` to specify color setting for the app
- Custom error reporting with `App::error`
- `App::debug_assert` test helper
- Replace `Arg::multiple(bool)` with `Arg::multiple_values` / `Arg::multiple_occurrences`
- Positionals can be either
- Added support for flag subcommands like pacman ([clap-rs/clap#1361](https://github.com/clap-rs/clap/issues/1361))
- Partial parsing via `AppSettings::IgnoreErrors` ([clap-rs/clap#1880](https://github.com/clap-rs/clap/issues/1880))
- Enable `cmd help` to print long help (`--help` instead of `-h`) with `AppSettings::UseLongFormatForHelpSubcommand` ([clap-rs/clap#2435](https://github.com/clap-rs/clap/issues/2435))
- Allow long arg abbreviations like we do with subcommands via `AppSettings::InferLongArgs` ([clap-rs/clap#2435](https://github.com/clap-rs/clap/issues/2435))
- Detect subcommands among positional arguments with `AppSettings::SubcommandPrecedenceOverArg`
- Give completion scripts hints with `Arg::value_hint` ([clap-rs/clap#1793](https://github.com/clap-rs/clap/pull/1793))
- Allow unsetting defaults with
- `Arg::default_value_if`, `Arg::default_value_if_os`, `Arg::default_value_ifs`,
`Arg::default_value_ifs_os` ([clap-rs/clap#1406](https://github.com/clap-rs/clap/issues/1406))
- Interpret some env variable values as `false` for flags, in addition to "not-present" ([clap-rs/clap#2539](https://github.com/clap-rs/clap/issues/2539))
- `n`, `no`, `f`, `false`, `off`, `0`
- Added `arg!` macro for creating an `Arg` from a compile-time usage parser
- *(Experimental)* Busybox-like multi-call support
- See `AppSettings::Multicall` behind `unstable-multicall` feature flag
- See [clap-rs/clap#1120](https://github.com/clap-rs/clap/issues/1120)
- *(Experimental)* Alias an argument to anything group of arguments
- See `App::replace` behind `unstable-replace` feature flag
- See [clap-rs#1603](https://github.com/clap-rs/clap/issues/1603)
- *(Experimental)* Grouping of multiple values within multiple occurrences
- See `ArgMatches::grouped_values_of` behind `unstable-grouped` feature flag
- See [clap-rs/clap#1026](https://github.com/clap-rs/clap/issues/1026)
**From structopt 0.3.25**
- Allow defaulting with native types via new `default_value_t [= <expr>]` attribute ([clap-rs/clap#1694](https://github.com/clap-rs/clap/issues/1694))
- New `update` API
- New `arg_enum` attribute for integrating with `ArgEnum` trait
On top of the clap 2 changes
### Fixes
**From clap 2**
- Correctly handle colored output on Windows
- Only generate version flags when `App::version`, `App::long_version` are set
(see [clap-rs/clap#2812](https://github.com/clap-rs/clap/issues/2812))
- General completion script improvements
- Limited default help text wrapping to 100 when `wrap_help` feature is not enabled
- Be more specific than `Arg::multiple` with `Arg::multiple_values` and `Arg::multiple_occurrences`
- `app_from_crate!` defaults to separating multiple authors with `", "`
- Ensure all examples work
- `IgnoreCase` is now unicode aware (requires `unicode` feature flag)
- Always respect `ColorChoice::Never`, even if that means we skip colors in some cases
- `ArgMatches` panics on unknown arguments
- Gracefully handle empty `authors` field in `Cargo.toml` with `app_from_crate`
- Do not show `--help` in `cmd help` with `DisableHelpFlag` ([clap-rs/clap#3169](https://github.com/clap-rs/clap/pull/3169))
- Do not show `--help` in `cmd help help` that doesn't work ([clap-rs/clap#3169](https://github.com/clap-rs/clap/pull/3169))
**From structopt 0.3.25**
- Support `SubcommandsNegateReqs` by allowing required `Option<_>`s ([clap-rs/clap#2255](https://github.com/clap-rs/clap/issues/2255))
- Infer `AllowInvalidUtf8` based on parser ([clap-rs/clap#751](https://github.com/clap-rs/clap/issues/2255))
- Gracefully handle empty `authors` field in `Cargo.toml`
- Don't panic with `default_value_os` but treat it like `default_value` ([clap-rs/clap#3031](https://github.com/clap-rs/clap/issues/3031))
- When using `flatten` and `subcommand`, ensure our doc comment always overrides the nested container's doc comment, whether it has only `about` or `about` and `long_about` ([clap-rs/clap#3175](]https://github.com/clap-rs/clap/pull/3175))
On top of the clap 2 changes
### Minimum Required Rust
- As of this release, `clap` requires `rustc 1.54.0` or greater.
## [2.34.0] - 2021-11-30
- Updates to Rust 2018 edition and bumps the MSRV to Rust 1.46
## [2.33.4] - 2021-11-29
### Bug Fixes
* **prevents `panic`:** swallows broken pipe errors on error output ([7a729bc4](https://github.com/kbknapp/clap-rs/commit/7a729bc4df2646b05f6bf15f001124cd39d076ce))
## [2.33.3] - 2020-08-13
### Improvements
* Suppress deprecation warnings when using `crate_*` macros.
## [2.33.2] - 2020-08-5
#### Documentation
* Fixed links to `2.x` examples. Now they point to the right place.
## [2.33.1] - 2020-05-11
### Bug Fixes
* Windows: Prevent some panics when parsing invalid Unicode on Windows ([922c645](https://github.com/clap-rs/clap/commit/922c64508389170c9c77f1c8a4e597d14d3ed2f0), closes [#1905](https://github.com/clap-rs/clap/issues/1905))
### Documentation
* fixes versions referenced in the README ([d307466a](https://github.com/kbknapp/clap-rs/commit/d307466af1013f172b8ec0252f01a473e2192d6b))
* **README.md:**
* cuts down the number of examples to reduce confusion ([6e508ee0](https://github.com/kbknapp/clap-rs/commit/6e508ee09e7153de4adf4e88b0aa6418a537dadd))
### Improvements
* **Deps:** doesnt compile ansi_term on Windows since its not used ([b57ee946](https://github.com/kbknapp/clap-rs/commit/b57ee94609da3ddc897286cfba968f26ff961491), closes [#1155](https://github.com/kbknapp/clap-rs/issues/1155))
### Minimum Required Rust
* As of this release, `clap` requires `rustc 1.36.0` or greater.
## [2.33.0] - 2019-04-06
#### New Sponsor
* Stephen Oats is now a sponsor \o/ ([823457c0](https://github.com/clap-rs/clap/commit/823457c0ef5e994ed7080cf62addbfe1aa3b1833))
* **SPONSORS.md:** fixes Josh Triplett's info in the sponsor document ([24cb5740](https://github.com/clap-rs/clap/commit/24cb574090a11159b48bba105d5ec2dfb0a20e4e))
#### Features
* **Completions:** adds completion support for Elvish. ([e9d0562a](https://github.com/clap-rs/clap/commit/e9d0562a1dc5dfe731ed7c767e6cee0af08f0cf9))
* There is a new setting to disable automatic building of `--help` and `-h` flags (`AppSettings::DisableAutoHelp`)
#### Improvements
* **arg_matches.rs:** add Debug implementations ([47192b7a](https://github.com/clap-rs/clap/commit/47192b7a2d84ec716b81ae4af621e008a8762dc9))
* **macros:** Support shorthand syntax for ArgGroups ([df9095e7](https://github.com/clap-rs/clap/commit/df9095e75bb1e7896415251d0d4ffd8a0ebcd559))
#### Documentation
* Refer to macOS rather than OSX. ([ab0d767f](https://github.com/clap-rs/clap/commit/ab0d767f3a5a57e2bbb97d0183c2ef63c8c77a6c))
* **README.md:** use https for all links ([96a7639a](https://github.com/clap-rs/clap/commit/96a7639a36bcb184c3f45348986883115ef1ab3a))
#### Bug Fixes
* add debug assertion for missing args in subcommand ArgGroup ([2699d9e5](https://github.com/clap-rs/clap/commit/2699d9e51e7eadc258ba64c4e347c5d1fef61343))
* Restore compat with Rust 1.21 ([6b263de1](https://github.com/clap-rs/clap/commit/6b263de1d42ede692ec5ee55019ad2fc6386f92e))
* Don't mention unused subcommands ([ef92e2b6](https://github.com/clap-rs/clap/commit/ef92e2b639ed305bdade4741f60fa85cb0101c5a))
* **OsValues:** Add `ExactSizeIterator` implementation ([356c69e5](https://github.com/clap-rs/clap/commit/356c69e508fd25a9f0ea2d27bf80ae1d9a8d88f4))
* **arg_enum!:**
* Fix comma position for valid values. ([1f1f9ff3](https://github.com/clap-rs/clap/commit/1f1f9ff3fa38a43231ef8be9cfea89a32e53f518))
* Invalid expansions of some trailing-comma patterns ([7023184f](https://github.com/clap-rs/clap/commit/7023184fca04e852c270341548d6a16207d13862))
* **completions:** improve correctness of completions when whitespace is involved ([5a08ff29](https://github.com/clap-rs/clap/commit/5a08ff295b2aa6ce29420df6252a0e3ff4441bdc))
* **help message:** Unconditionally uses long description for subcommands ([6acc8b6a](https://github.com/clap-rs/clap/commit/6acc8b6a621a765cbf513450188000d943676a30), closes [#897](https://github.com/clap-rs/clap/issues/897))
* **macros:** fixes broken pattern which prevented calling multi-argument Arg methods ([9e7a352e](https://github.com/clap-rs/clap/commit/9e7a352e13aaf8025d80f2bac5c47fb32528672b))
* **parser:** Better interaction between AllowExternalSubcommands and SubcommandRequired ([9601c95a](https://github.com/clap-rs/clap/commit/9601c95a03d2b82bf265c328b4769238f1b79002))
#### Minimum Required Rust
* As of this release, `clap` requires `rustc 1.31.0` or greater.
## v2.32.0 (2018-06-26)
#### Minimum Required Rust
* As of this release, `clap` requires `rustc 1.21.0` or greater.
#### Features
* **Completions:** adds completion support for Elvish. ([e9d0562a](https://github.com/clap-rs/clap/commit/e9d0562a1dc5dfe731ed7c767e6cee0af08f0cf9))
#### Improvements
* **macros:** Support shorthand syntax for ArgGroups ([df9095e7](https://github.com/clap-rs/clap/commit/df9095e75bb1e7896415251d0d4ffd8a0ebcd559))
#### Bug Fixes
* **OsValues:** Add `ExactSizeIterator` implementation ([356c69e5](https://github.com/clap-rs/clap/commit/356c69e508fd25a9f0ea2d27bf80ae1d9a8d88f4))
* **arg_enum!:** Invalid expansions of some trailing-comma patterns ([7023184f](https://github.com/clap-rs/clap/commit/7023184fca04e852c270341548d6a16207d13862))
* **help message:** Unconditionally uses long description for subcommands ([6acc8b6a](https://github.com/clap-rs/clap/commit/6acc8b6a621a765cbf513450188000d943676a30), closes [#897](https://github.com/clap-rs/clap/issues/897))
#### Documentation
* Refer to macOS rather than OSX. ([ab0d767f](https://github.com/clap-rs/clap/commit/ab0d767f3a5a57e2bbb97d0183c2ef63c8c77a6c))
## v2.31.2 (2018-03-19)
#### Bug Fixes
* **Fish Completions:** fixes a bug that only allowed a single completion in in Fish Shell ([e8774a8](https://github.com/clap-rs/clap/pull/1214/commits/e8774a84ee4a319c888036e7c595ab46451d8e48), closes [#1212](https://github.com/clap-rs/clap/issues/1212))
* **AllowExternalSubcommands**: fixes a bug where external subcommands would be blocked by a similarly named subcommand (suggestions were getting in the way). ([a410e85](https://github.com/clap-rs/clap/pull/1215/commits/a410e855bcd82b05f9efa73fa8b9774dc8842c6b))
#### Documentation
* Fixes some typos in the `README.md` ([c8e685d7](https://github.com/clap-rs/clap/commit/c8e685d76adee2a3cc06cac6952ffcf6f9548089))
## v2.31.1 (2018-03-06)
#### Improvements
* **AllowMissingPositional:** improves the ability of AllowMissingPositional to allow 'skipping' to the last positional arg with '--' ([df20e6e2](https://github.com/clap-rs/clap/commit/df20e6e24b4e782be0b423b484b9798e3e2efe2f))
## v2.31.0 (2018-03-04)
#### Features
* **Arg Indices:** adds the ability to query argument value indices ([f58d0576](https://github.com/clap-rs/clap/commit/f58d05767ec8133c8eb2de117cb642b9ae29ccbc))
* **Indices:** implements an Indices<Item=&usize> iterator ([1e67be44](https://github.com/clap-rs/clap/commit/1e67be44f0ccf161cc84c4e6082382072e89c302))
* **Raw Args** adds a convenience function to `Arg` that allows implying all of `Arg::last` `Arg::allow_hyphen_values` and `Arg::multiple(true)` ([66a78f29](https://github.com/clap-rs/clap/commit/66a78f2972786f5fe7c07937a1ac23da2542afd2))
#### Documentation
* Fix some typos and markdown issues. ([935ba0dd](https://github.com/clap-rs/clap/commit/935ba0dd547a69c3f636c5486795012019408794))
* **Arg Indices:** adds the documentation for the arg index querying methods ([50bc0047](https://github.com/clap-rs/clap/commit/50bc00477afa64dc6cdc5de161d3de3ba1d105a7))
* **CONTRIBUTING.md:** fix url to clippy upstream repo to point to https://github.com/rust-lang-nursery/rust-clippy instead of https://github.com/Manishearth/rust-clippy ([42407d7f](https://github.com/clap-rs/clap/commit/42407d7f21d794103cda61f49d2615aae0a4bcd9))
* **Values:** improves the docs example of the Values iterator ([74075d65](https://github.com/clap-rs/clap/commit/74075d65e8db1ddb5e2a4558009a5729d749d1b6))
* Updates readme to hint that the `wrap_help` feature is a thing ([fc7ab227](https://github.com/clap-rs/clap/commit/66a78f2972786f5fe7c07937a1ac23da2542afd2))
### Improvements
* Cargo.toml: use codegen-units = 1 in release and bench profiles ([19f425ea](https://github.com/clap-rs/clap/commit/66a78f2972786f5fe7c07937a1ac23da2542afd2))
* Adds WASM support (clap now compiles on WASM!) ([689949e5](https://github.com/clap-rs/clap/commit/689949e57d390bb61bc69f3ed91f60a2105738d0))
* Uses the short help tool-tip for PowerShell completion scripts ([ecda22ce](https://github.com/clap-rs/clap/commit/ecda22ce7210ce56d7b2d1a5445dd1b8a2959656))
## v2.30.0 (2018-02-13)
#### Bug Fixes
* **YAML:** Adds a missing conversion from `Arg::last` when instantiating from a YAML file ([aab77c81a5](https://github.com/clap-rs/clap/pull/1175/commits/aab77c81a519b045f95946ae0dd3e850f9b93070), closes [#1160](https://github.com/clap-rs/clap/issues/1173))
#### Improvements
* **Bash Completions:** instead of completing a generic option name, all bash completions fall back to file completions UNLESS `Arg::possible_values` was used ([872f02ae](https://github.com/clap-rs/clap/commit/872f02aea900ffa376850a279eb164645e1234fa))
* **Deps:** No longer needlessly compiles `ansi_term` on Windows since its not used ([b57ee946](https://github.com/clap-rs/clap/commit/b57ee94609da3ddc897286cfba968f26ff961491), closes [#1155](https://github.com/clap-rs/clap/issues/1155))
* **Help Message:** changes the `[values: foo bar baz]` array to `[possible values: foo bar baz]` for consistency with the API ([414707e4e97](https://github.com/clap-rs/clap/pull/1176/commits/414707e4e979d07bfe555247e5d130c546673708), closes [#1160](https://github.com/clap-rs/clap/issues/1160))
## v2.29.4 (2018-02-06)
#### Bug Fixes
* **Overrides Self:** fixes a bug where options with multiple values couldn't ever have multiple values ([d95907cf](https://github.com/clap-rs/clap/commit/d95907cff6d011a901fe35fa00b0f4e18547a1fb))
## v2.29.3 (2018-02-05)
#### Improvements
* **Overrides:** clap now supports arguments which override with themselves ([6c7a0010](https://github.com/clap-rs/clap/commit/6c7a001023ca1eac1cc6ffe6c936b4c4a2aa3c45), closes [#976](https://github.com/clap-rs/clap/issues/976))
#### Bug Fixes
* **Requirements:** fixes an issue where conflicting args would still show up as required ([e06cefac](https://github.com/clap-rs/clap/commit/e06cefac97083838c0a4e1444dcad02a5c3f911e), closes [#1158](https://github.com/clap-rs/clap/issues/1158))
* Fixes a bug which disallows proper nesting of `--` ([73993fe](https://github.com/clap-rs/clap/commit/73993fe30d135f682e763ec93dcb0814ed518011), closes [#1161](https://github.com/clap-rs/clap/issues/1161))
#### New Settings
* **AllArgsOverrideSelf:** adds a new convenience setting to allow all args to override themselves ([4670325d](https://github.com/clap-rs/clap/commit/4670325d1bf0369addec2ae2bcb56f1be054c924))
## v2.29.2 (2018-01-16)
#### Features
* **completions/zsh.rs:**
* Escape possible values for options ([25561dec](https://github.com/clap-rs/clap/commit/25561decf147d329b64634a14d9695673c2fc78f))
* Implement positional argument possible values completion ([f3b0afd2](https://github.com/clap-rs/clap/commit/f3b0afd2bef8b7be97162f8a7802ddf7603dff36))
* Complete positional arguments properly ([e39aeab8](https://github.com/clap-rs/clap/commit/e39aeab8487596046fbdbc6a226e5c8820585245))
#### Bug Fixes
* **completions/zsh.rs:**
* Add missing autoload for is-at-least ([a6522607](https://github.com/clap-rs/clap/commit/a652260795d1519f6ec2a7a09ccc1258499cad7b))
* Don't pass -S to _arguments if Zsh is too old ([16b4f143](https://github.com/clap-rs/clap/commit/16b4f143ff466b7ef18a267bc44ade0f9639109b))
* Maybe fix completions with mixed positionals and subcommands ([1146f0da](https://github.com/clap-rs/clap/commit/1146f0da154d6796fbfcb09db8efa3593cb0d898))
* **completions/zsh.zsh:** Remove redundant code from output ([0e185b92](https://github.com/clap-rs/clap/commit/0e185b922ed1e0fd653de00b4cd8d567d72ff68e), closes [#1142](https://github.com/clap-rs/clap/issues/1142))
### 2.29.1 (2018-01-09)
#### Documentation
* fixes broken links. ([56e734b8](https://github.com/clap-rs/clap/commit/56e734b839303d733d2e5baf7dac39bd7b97b8e4))
* updates contributors list ([e1313a5a](https://github.com/clap-rs/clap/commit/e1313a5a0f69d8f4016f73b860a63af8318a6676))
#### Performance
* further debloating by removing generics from error cases ([eb8d919e](https://github.com/clap-rs/clap/commit/eb8d919e6f3443db279ba0c902f15d76676c02dc))
* debloats clap by deduplicating logic and refactors ([03e413d7](https://github.com/clap-rs/clap/commit/03e413d7175d35827cd7d8908d47dbae15a849a3))
#### Bug Fixes
* fixes the ripgrep benchmark by adding a value to a flag that expects it ([d26ab2b9](https://github.com/clap-rs/clap/commit/d26ab2b97cf9c0ea675b440b7b0eaf6ac3ad01f4))
* **bash completion:** Change the bash completion script code generation to support hyphens. ([ba7f1d18](https://github.com/clap-rs/clap/commit/ba7f1d18eba7a07ce7f57e0981986f66c994b639))
* **completions/zsh.rs:** Fix completion of long option values ([46365cf8](https://github.com/clap-rs/clap/commit/46365cf8be5331ba04c895eb183e2f230b5aad51))
## 2.29.0 (2017-12-02)
#### API Additions
* **Arg:** adds Arg::hide_env_values(bool) which allows one to hide any current env values and display only the key in help messages ([fb41d062](https://github.com/clap-rs/clap/commit/fb41d062eedf37cb4f805c90adca29909bd197d7))
## 2.28.0 (2017-11-28)
The minimum required Rust is now 1.20. This was done to start using bitflags 1.0 and having >1.0 deps is a *very good* thing!
#### Documentation
* changes the demo version to 2.28 to stay in sync ([ce6ca492](https://github.com/clap-rs/clap/commit/ce6ca492c7510ab6474075806360b96081b021a9))
* Fix URL path to github hosted files ([ce72aada](https://github.com/clap-rs/clap/commit/ce72aada56a9581d4a6cb4bf9bdb861c3906f8df), closes [#1106](https://github.com/clap-rs/clap/issues/1106))
* fix typo ([002b07fc](https://github.com/clap-rs/clap/commit/002b07fc98a1c85acb66296b1eec0b2aba906125))
* **README.md:** updates the readme and pulls out some redundant sections ([db6caf86](https://github.com/clap-rs/clap/commit/db6caf8663747e679d2f4ed3bd127f33476754aa))
#### Improvements
* adds '[SUBCOMMAND]' to usage strings with only AppSettings::AllowExternalSubcommands is used with no other subcommands ([e78bb757](https://github.com/clap-rs/clap/commit/e78bb757a3df16e82d539e450c06767a6bfcf859), closes [#1093](https://github.com/clap-rs/clap/issues/1093))
#### API Additions
* Adds Arg::case_insensitive(bool) which allows matching Arg::possible_values without worrying about ASCII case ([1fec268e](https://github.com/clap-rs/clap/commit/1fec268e51736602e38e67c76266f439e2e0ef12), closes [#1118](https://github.com/clap-rs/clap/issues/1118))
* Adds the traits to be used with the clap-derive crate to be able to use Custom Derive ([6f4c3412](https://github.com/clap-rs/clap/commit/6f4c3412415e882f5ca2cc3fbd6d4dce79440828))
#### Bug Fixes
* Fixes a regression where --help couldn't be overridden ([a283d69f](https://github.com/clap-rs/clap/commit/a283d69fc08aa016ae1bf9ba010012abecc7ba69), closes [#1112](https://github.com/clap-rs/clap/issues/1112))
* fixes a bug that allowed options to pass parsing when no value was provided ([2fb75821](https://github.com/clap-rs/clap/commit/2fb758219c7a60d639da67692e100b855a8165ac), closes [#1105](https://github.com/clap-rs/clap/issues/1105))
* ignore PropagateGlobalValuesDown deprecation warning ([f61ce3f5](https://github.com/clap-rs/clap/commit/f61ce3f55fe65e16b3db0bd4facdc4575de22767), closes [#1086](https://github.com/clap-rs/clap/issues/1086))
#### Deps
* Updates `bitflags` to 1.0
## v2.27.1 (2017-10-24)
#### Bug Fixes
* Adds `term_size` as an optional dependency (with feature `wrap_help`) to fix compile bug
## v2.27.0 (2017-10-24)
** This release raises the minimum required version of Rust to 1.18 **
** This release also contains a very minor breaking change to fix a bug **
The only CLIs affected will be those using unrestrained multiple values and subcommands where the
subcommand name can coincide with one of the multiple values.
See the commit [0c223f54](https://github.com/clap-rs/clap/commit/0c223f54ed46da406bc8b43a5806e0b227863b31) for full details.
#### Bug Fixes
* Values from global args are now propagated UP and DOWN!
* fixes a bug where using AppSettings::AllowHyphenValues would allow invalid arguments even when there is no way for them to be valid ([77ed4684](https://github.com/clap-rs/clap/commit/77ed46841fc0263d7aa32fcc5cc49ef703b37c04), closes [#1066](https://github.com/clap-rs/clap/issues/1066))
* when an argument requires a value and that value happens to match a subcommand name, its parsed as a value ([0c223f54](https://github.com/clap-rs/clap/commit/0c223f54ed46da406bc8b43a5806e0b227863b31), closes [#1031](https://github.com/clap-rs/clap/issues/1031), breaks [#](https://github.com/clap-rs/clap/issues/), [#](https://github.com/clap-rs/clap/issues/))
* fixes a bug that prevented number_of_values and default_values to be used together ([5eb342a9](https://github.com/clap-rs/clap/commit/5eb342a99dde07b0f011048efde3e283bc1110fc), closes [#1050](https://github.com/clap-rs/clap/issues/1050), [#1056](https://github.com/clap-rs/clap/issues/1056))
* fixes a bug that didn't allow args with default values to have conflicts ([58b5b4be](https://github.com/clap-rs/clap/commit/58b5b4be315280888d50d9b15119b91a9028f050), closes [#1071](https://github.com/clap-rs/clap/issues/1071))
* fixes a panic when using global args and calling App::get_matches_from_safe_borrow multiple times ([d86ec797](https://github.com/clap-rs/clap/commit/d86ec79742c77eb3f663fb30e225954515cf25bb), closes [#1076](https://github.com/clap-rs/clap/issues/1076))
* fixes issues and potential regressions with global args values not being propagated properly or at all ([a43f9dd4](https://github.com/clap-rs/clap/commit/a43f9dd4aaf1864dd14a3c28dec89ccdd70c61e5), closes [#1010](https://github.com/clap-rs/clap/issues/1010), [#1061](https://github.com/clap-rs/clap/issues/1061), [#978](https://github.com/clap-rs/clap/issues/978))
* fixes a bug where default values are not applied if the option supports zero values ([9c248cbf](https://github.com/clap-rs/clap/commit/9c248cbf7d8a825119bc387c23e9a1d1989682b0), closes [#1047](https://github.com/clap-rs/clap/issues/1047))
#### Documentation
* adds additional blurbs about using multiples with subcommands ([03455b77](https://github.com/clap-rs/clap/commit/03455b7751a757e7b2f6ffaf2d16168539c99661))
* updates the docs to reflect changes to global args and that global args values can now be propagated back up the stack ([ead076f0](https://github.com/clap-rs/clap/commit/ead076f03ada4c322bf3e34203925561ec496d87))
* add html_root_url attribute ([e67a061b](https://github.com/clap-rs/clap/commit/e67a061bcf567c6518d6c2f58852e01f02764b22))
* sync README version numbers with crate version ([5536361b](https://github.com/clap-rs/clap/commit/5536361bcda29887ed86bb68e43d0b603cbc423f))
#### Improvements
* args that have require_delimiter(true) is now reflected in help and usage strings ([dce61699](https://github.com/clap-rs/clap/commit/dce616998ed9bd95e8ed3bec1f09a4883da47b85), closes [#1052](https://github.com/clap-rs/clap/issues/1052))
* if all subcommands are hidden, the subcommands section of the help message is no longer displayed ([4ae7b046](https://github.com/clap-rs/clap/commit/4ae7b0464750bc07ec80ece38e43f003fdd1b8ae), closes [#1046](https://github.com/clap-rs/clap/issues/1046))
#### Breaking Changes
* when an argument requires a value and that value happens to match a subcommand name, its parsed as a value ([0c223f54](https://github.com/clap-rs/clap/commit/0c223f54ed46da406bc8b43a5806e0b227863b31), closes [#1031](https://github.com/clap-rs/clap/issues/1031), breaks [#](https://github.com/clap-rs/clap/issues/), [#](https://github.com/clap-rs/clap/issues/))
#### Deprecations
* **AppSettings::PropagateGlobalValuesDown:** this setting is no longer required to propagate values down or up ([2bb5ddce](https://github.com/clap-rs/clap/commit/2bb5ddcee61c791ca1aaca494fbeb4bd5e277488))
## v2.26.2 (2017-09-14)
#### Improvements
* if all subcommands are hidden, the subcommands section of the help message is no longer displayed ([4ae7b046](https://github.com/clap-rs/clap/commit/4ae7b0464750bc07ec80ece38e43f003fdd1b8ae), closes [#1046](https://github.com/clap-rs/clap/issues/1046))
#### Bug Fixes
* fixes a bug where default values are not applied if the option supports zero values ([9c248cbf](https://github.com/clap-rs/clap/commit/9c248cbf7d8a825119bc387c23e9a1d1989682b0), closes [#1047](https://github.com/clap-rs/clap/issues/1047))
## v2.26.1 (2017-09-14)
#### Bug Fixes
* fixes using require_equals(true) and min_values(0) together ([10ae208f](https://github.com/clap-rs/clap/commit/10ae208f68518eff6e98166724065745f4083174), closes [#1044](https://github.com/clap-rs/clap/issues/1044))
* escape special characters in zsh and fish completions ([87e019fc](https://github.com/clap-rs/clap/commit/87e019fc84ba6193a8c4ddc26c61eb99efffcd25))
* avoid panic generating default help msg if term width set to 0 due to bug in textwrap 0.7.0 ([b3eadb0d](https://github.com/clap-rs/clap/commit/b3eadb0de516106db4e08f078ad32e8f6d6e7a57))
* Change `who's` -> `whose` ([53c1ffe8](https://github.com/clap-rs/clap/commit/53c1ffe87f38b05d8804a0f7832412a952845349))
* adds a debug assertion to ensure all args added to groups actually exist ([7ad123e2](https://github.com/clap-rs/clap/commit/7ad123e2c02577e3ca30f7e205181e896b157d11), closes [#917](https://github.com/clap-rs/clap/issues/917))
* fixes a bug where args that allow values to start with a hyphen couldn't contain a double hyphen -- as a value ([ab2f4c9e](https://github.com/clap-rs/clap/commit/ab2f4c9e563e36ec739a4b55d5a5b76fdb9e9fa4), closes [#960](https://github.com/clap-rs/clap/issues/960))
* fixes a bug where positional argument help text is misaligned ([54c16836](https://github.com/clap-rs/clap/commit/54c16836dea4651806a2cfad53146a83fa3abf21))
* **Help Message:** fixes long_about not being usable ([a8257ea0](https://github.com/clap-rs/clap/commit/a8257ea0ffb812e552aca256c4a3d2aebfd8065b), closes [#1043](https://github.com/clap-rs/clap/issues/1043))
* **Suggestions:** output for flag after subcommand ([434ea5ba](https://github.com/clap-rs/clap/commit/434ea5ba71395d8c1afcf88e69f0b0d8339b01a1))
## v2.26.0 (2017-07-29)
Minimum version of Rust is now v1.13.0 (Stable)
#### Improvements
* bumps unicode-segmentation to v1.2 ([cd7b40a2](https://github.com/clap-rs/clap/commit/cd7b40a21c77bae17ba453c5512cb82b7d1ce474))
#### Performance
* update textwrap to version 0.7.0 ([c2d4e637](https://github.com/clap-rs/clap/commit/c2d4e63756a6f070e38c16dff846e9b0a53d6f93))
## v2.25.1 (2017-07-21)
#### Improvements
* impl Default for Values + OsValues for any lifetime. ([fb7d6231f1](https://github.com/clap-rs/clap/commit/fb7d6231f13a2f79f411e62dca210b7dc9994c18))
#### Documentation
* Various documentation typos and grammar fixes
## v2.25.0 (2017-06-20)
#### Features
* use textwrap crate for wrapping help texts ([b93870c1](https://github.com/clap-rs/clap/commit/b93870c10ae3bd90d233c586a33e086803117285))
#### Improvements
* **Suggestions:** suggests to use flag after subcommand when applicable ([2671ca72](https://github.com/clap-rs/clap/commit/2671ca7260119d4311d21c4075466aafdd9da734))
* Bumps bitflags crate to v0.9
#### Documentation
* Change `who's` -> `whose` ([53c1ffe8](https://github.com/clap-rs/clap/commit/53c1ffe87f38b05d8804a0f7832412a952845349))
#### Documentation
* **App::template:** adds details about the necessity to use AppSettings::UnifiedHelpMessage when using {unified} tags in the help template ([cbea3d5a](https://github.com/clap-rs/clap/commit/cbea3d5acf3271a7a734498c4d99c709941c331e), closes [#949](https://github.com/clap-rs/clap/issues/949))
* **Arg::allow_hyphen_values:** updates the docs to include warnings for allow_hyphen_values and multiple(true) used together ([f9b0d657](https://github.com/clap-rs/clap/commit/f9b0d657835d3f517f313d70962177dc30acf4a7))
* **README.md:**
* added a warning about using ~ deps ([821929b5](https://github.com/clap-rs/clap/commit/821929b51bd60213955705900a436c9a64fcb79f), closes [#964](https://github.com/clap-rs/clap/issues/964))
* **clap_app!:** adds using the @group specifier to the macro docs ([826048cb](https://github.com/clap-rs/clap/commit/826048cb3cbc0280169303f1498ff0a2b7395883), closes [#932](https://github.com/clap-rs/clap/issues/932))
## v2.24.2 (2017-05-15)
#### Bug Fixes
* adds a debug assertion to ensure all args added to groups actually exist ([14f6b8f3](https://github.com/clap-rs/clap/commit/14f6b8f3a2f6df73aeeec9c54a54909b1acfc158), closes [#917](https://github.com/clap-rs/clap/issues/917))
* fixes a bug where args that allow values to start with a hyphen couldn't contain a double hyphen -- as a value ([ebf73a09](https://github.com/clap-rs/clap/commit/ebf73a09db6f3c03c19cdd76b1ba6113930e1643), closes [#960](https://github.com/clap-rs/clap/issues/960))
* fixes a bug where positional argument help text is misaligned ([54c16836](https://github.com/clap-rs/clap/commit/54c16836dea4651806a2cfad53146a83fa3abf21))
#### Documentation
* **App::template:** adds details about the necessity to use AppSettings::UnifiedHelpMessage when using {unified} tags in the help template ([cf569438](https://github.com/clap-rs/clap/commit/cf569438f309c199800bb8e46c9f140187de69d7), closes [#949](https://github.com/clap-rs/clap/issues/949))
* **Arg::allow_hyphen_values:** updates the docs to include warnings for allow_hyphen_values and multiple(true) used together ([ded5a2f1](https://github.com/clap-rs/clap/commit/ded5a2f15474d4a5bd46a67b130ccb8b6781bd01))
* **clap_app!:** adds using the @group specifier to the macro docs ([fe85fcb1](https://github.com/clap-rs/clap/commit/fe85fcb1772b61f13b20b7ea5290e2437a76190c), closes [#932](https://github.com/clap-rs/clap/issues/932))
## v2.24.0 (2017-05-07)
#### Bug Fixes
* fixes a bug where args with last(true) and required(true) set were not being printed in the usage string ([3ac533fe](https://github.com/clap-rs/clap/commit/3ac533fedabf713943eedf006f830a5a486bbe80), closes [#944](https://github.com/clap-rs/clap/issues/944))
* fixes a bug that was printing the arg name, instead of value name when Arg::last(true) was used ([e1fe8ac3](https://github.com/clap-rs/clap/commit/e1fe8ac3bc1f9cf4e36df0d881f8419755f1787b), closes [#940](https://github.com/clap-rs/clap/issues/940))
* fixes a bug where flags were parsed as flags AND positional values when specific combinations of settings were used ([20f83292](https://github.com/clap-rs/clap/commit/20f83292d070038b8cee2a6b47e91f6b0a2f7871), closes [#946](https://github.com/clap-rs/clap/issues/946))
## v2.24.0 (2017-05-05)
#### Documentation
* **README.md:** fix some typos ([fa34deac](https://github.com/clap-rs/clap/commit/fa34deac079f334c3af97bb7fb151880ba8887f8))
#### API Additions
* **Arg:** add `default_value_os` ([d5ef8955](https://github.com/clap-rs/clap/commit/d5ef8955414b1587060f7218385256105b639c88))
* **arg_matches.rs:** Added a Default implementation for Values and OsValues iterators. ([0a4384e3](https://github.com/clap-rs/clap/commit/0a4384e350eed74c2a4dc8964c203f21ac64897f))
## v2.23.2 (2017-04-19)
#### Bug Fixes
* **PowerShell Completions:** fixes a bug where powershells completions cant be used if no subcommands are defined ([a8bce558](https://github.com/clap-rs/clap/commit/a8bce55837dc4e0fb187dc93180884a40ae09c6f), closes [#931](https://github.com/clap-rs/clap/issues/931))
#### Improvements
* bumps term_size to take advantage of better terminal dimension handling ([e05100b7](https://github.com/clap-rs/clap/commit/e05100b73d74066a90876bf38f952adf5e8ee422))
* **PowerShell Completions:** massively dedups subcommand names in the generate script to make smaller scripts that are still functionally equiv ([85b0e1cc](https://github.com/clap-rs/clap/commit/85b0e1cc4b9755dda75a93d898d79bc38631552b))
#### Documentation
* Fix a typo the minimum rust version required ([71dabba3](https://github.com/clap-rs/clap/commit/71dabba3ea0a17c88b0e2199c9d99f0acbf3bc17))
## v2.23.1 (2017-04-05)
#### Bug Fixes
* fixes a missing newline character in the autogenerated help and version messages in some instances ([5ae9007d](https://github.com/clap-rs/clap/commit/5ae9007d984ae94ae2752df51bcbaeb0ec89bc15))
## v2.23.0 (2017-04-05)
#### API Additions
* `App::long_about`
* `App::long_version`
* `App::print_long_help`
* `App::write_long_help`
* `App::print_long_version`
* `App::write_long_version`
* `Arg::long_help`
#### Features
* allows distinguishing between short and long version messages (-V/short or --version/long) ([59272b06](https://github.com/clap-rs/clap/commit/59272b06cc213289dc604dbc694cb95d383a5d68))
* allows distinguishing between short and long help with subcommands in the same manner as args ([6b371891](https://github.com/clap-rs/clap/commit/6b371891a1702173a849d1e95f9fecb168bf6fc4))
* allows specifying a short help vs a long help (i.e. varying levels of detail depending on if -h or --help was used) ([ef1b24c3](https://github.com/clap-rs/clap/commit/ef1b24c3a0dff2f58c5e2e90880fbc2b69df20ee))
* **clap_app!:** adds support for arg names with hyphens similar to longs with hyphens ([f7a88779](https://github.com/clap-rs/clap/commit/f7a8877978c8f90e6543d4f0d9600c086cf92cd7), closes [#869](https://github.com/clap-rs/clap/issues/869))
#### Bug Fixes
* fixes a bug that wasn't allowing help and version to be properly overridden ([8b2ceb83](https://github.com/clap-rs/clap/commit/8b2ceb8368bcb70689fadf1c7f4b9549184926c1), closes [#922](https://github.com/clap-rs/clap/issues/922))
#### Documentation
* **clap_app!:** documents the `--("some-arg")` method for using args with hyphens inside them ([bc08ef3e](https://github.com/clap-rs/clap/commit/bc08ef3e185393073d969d301989b6319c616c1f), closes [#919](https://github.com/clap-rs/clap/issues/919))
## v2.22.2 (2017-03-30)
#### Bug Fixes
* **Custom Usage Strings:** fixes the usage string regression when using help templates ([0e4fd96d](https://github.com/clap-rs/clap/commit/0e4fd96d74280d306d09e60ac44f938a82321769))
## v2.22.1 (2017-03-24)
#### Bug Fixes
* **usage:** fixes a big regression with custom usage strings ([2c41caba](https://github.com/clap-rs/clap/commit/2c41caba3c7d723a2894e315d04da796b0e97759))
## v2.22.0 (2017-03-23)
#### API Additions
* **App::name:** adds the ability to change the name of the App instance after creation ([d49e8292](https://github.com/clap-rs/clap/commit/d49e8292b026b06e2b70447cd9f08299f4fcba76), closes [#908](https://github.com/clap-rs/clap/issues/908))
* **Arg::hide_default_value:** adds ability to hide the default value of an argument from the help string ([89e6ea86](https://github.com/clap-rs/clap/commit/89e6ea861e16a1ad56757ca12f6b32d02253e44a), closes [#902](https://github.com/clap-rs/clap/issues/902))
## v2.21.3 (2017-03-23)
#### Bug Fixes
* **yaml:** adds support for loading author info from yaml ([e04c390c](https://github.com/clap-rs/clap/commit/e04c390c597a55fa27e724050342f16c42f1c5c9))
## v2.21.2 (2017-03-17)
#### Improvements
* add fish subcommand help support ([f8f68cf8](https://github.com/clap-rs/clap/commit/f8f68cf8251669aef4539a25a7c1166f0ac81ea6))
* options that use `require_equals(true)` now display the equals sign in help messages, usage strings, and errors" ([c8eb0384](https://github.com/clap-rs/clap/commit/c8eb0384d394d2900ccdc1593099c97808a3fa05), closes [#903](https://github.com/clap-rs/clap/issues/903))
#### Bug Fixes
* setting the max term width now correctly propagates down through child subcommands
## v2.21.1 (2017-03-12)
#### Bug Fixes
* **ArgRequiredElseHelp:** fixes the precedence of this error to prioritize over other error messages ([74b751ff](https://github.com/clap-rs/clap/commit/74b751ff2e3631e337b7946347c1119829a41c53), closes [#895](https://github.com/clap-rs/clap/issues/895))
* **Positionals:** fixes some regression bugs resulting from old asserts in debug mode. ([9a3bc98e](https://github.com/clap-rs/clap/commit/9a3bc98e9b55e7514b74b73374c5ac8b6e5e0508), closes [#896](https://github.com/clap-rs/clap/issues/896))
## v2.21.0 (2017-03-09)
#### Performance
* doesn't run `arg_post_processing` on multiple values anymore ([ec516182](https://github.com/clap-rs/clap/commit/ec5161828729f6a53f0fccec8648f71697f01f78))
* changes internal use of `VecMap` to `Vec` for matched values of `Arg`s ([22bf137a](https://github.com/clap-rs/clap/commit/22bf137ac581684c6ed460d2c3c640c503d62621))
* vastly reduces the amount of cloning when adding non-global args minus when they're added from `App::args` which is forced to clone ([8da0303b](https://github.com/clap-rs/clap/commit/8da0303bc02db5fe047cfc0631a9da41d9dc60f7))
* refactor to remove unneeded vectors and allocations and checks for significant performance increases ([0efa4119](https://github.com/clap-rs/clap/commit/0efa4119632f134fc5b8b9695b007dd94b76735d))
#### Documentation
* Fix examples link in CONTRIBUTING.md ([60cf875d](https://github.com/clap-rs/clap/commit/60cf875d67a252e19bb85054be57696fac2c57a1))
#### Improvements
* when `AppSettings::SubcommandsNegateReqs` and `ArgsNegateSubcommands` are used, a new more accurate double line usage string is shown ([50f02300](https://github.com/clap-rs/clap/commit/50f02300d81788817acefef0697e157e01b6ca32), closes [#871](https://github.com/clap-rs/clap/issues/871))
#### API Additions
* **Arg::last:** adds the ability to mark a positional argument as 'last' which means it should be used with `--` syntax and can be accessed early ([6a7aea90](https://github.com/clap-rs/clap/commit/6a7aea9043b83badd9ab038b4ecc4c787716147e), closes [#888](https://github.com/clap-rs/clap/issues/888))
* provides `default_value_os` and `default_value_if[s]_os` ([0f2a3782](https://github.com/clap-rs/clap/commit/0f2a378219a6930748d178ba350fe5925be5dad5), closes [#849](https://github.com/clap-rs/clap/issues/849))
* provides `App::help_message` and `App::version_message` which allows one to override the auto-generated help/version flag associated help ([389c413](https://github.com/clap-rs/clap/commit/389c413b7023dccab8c76aa00577ea1d048e7a99), closes [#889](https://github.com/clap-rs/clap/issues/889))
#### New Settings
* **InferSubcommands:** adds a setting to allow one to infer shortened subcommands or aliases (i.e. for subcommmand "test", "t", "te", or "tes" would be allowed assuming no other ambiguities) ([11602032](https://github.com/clap-rs/clap/commit/11602032f6ff05881e3adf130356e37d5e66e8f9), closes [#863](https://github.com/clap-rs/clap/issues/863))
#### Bug Fixes
* doesn't print the argument sections in the help message if all args in that section are hidden ([ce5ee5f5](https://github.com/clap-rs/clap/commit/ce5ee5f5a76f838104aeddd01c8ec956dd347f50))
* doesn't include the various [ARGS] [FLAGS] or [OPTIONS] if the only ones available are hidden ([7b4000af](https://github.com/clap-rs/clap/commit/7b4000af97637703645c5fb2ac8bb65bd546b95b), closes [#882](https://github.com/clap-rs/clap/issues/882))
* now correctly shows subcommand as required in the usage string when AppSettings::SubcommandRequiredElseHelp is used ([8f0884c1](https://github.com/clap-rs/clap/commit/8f0884c1764983a49b45de52a1eddf8d721564d8))
* fixes some memory leaks when an error is detected and clap exits ([8c2dd287](https://github.com/clap-rs/clap/commit/8c2dd28718262ace4ae0db98563809548e02a86b))
* fixes a trait that's marked private accidentally, but should be crate internal public ([1ae21108](https://github.com/clap-rs/clap/commit/1ae21108015cea87e5360402e1747025116c7878))
* **Completions:** fixes a bug that tried to propagate global args multiple times when generating multiple completion scripts ([5e9b9cf4](https://github.com/clap-rs/clap/commit/5e9b9cf4dd80fa66a624374fd04e6545635c1f94), closes [#846](https://github.com/clap-rs/clap/issues/846))
#### Features
* **Options:** adds the ability to require the equals syntax with options --opt=val ([f002693d](https://github.com/clap-rs/clap/commit/f002693dec6a6959c4e9590cb7b7bfffd6d6e5bc), closes [#833](https://github.com/clap-rs/clap/issues/833))
## v2.20.5 (2017-02-18)
#### Bug Fixes
* **clap_app!:** fixes a critical bug of a missing fragment specifier when using `!property` style tags. ([5635c1f94](https://github.com/clap-rs/clap/commit/5e9b9cf4dd80fa66a624374fd04e6545635c1f94))
## v2.20.4 (2017-02-15)
#### Bug Fixes
* **Completions:** fixes a bug that tried to propagate global args multiple times when generating multiple completion scripts ([5e9b9cf4](https://github.com/clap-rs/clap/commit/5e9b9cf4dd80fa66a624374fd04e6545635c1f94), closes [#846](https://github.com/clap-rs/clap/issues/846))
#### Documentation
* Fix examples link in CONTRIBUTING.md ([60cf875d](https://github.com/clap-rs/clap/commit/60cf875d67a252e19bb85054be57696fac2c57a1))
## v2.20.3 (2017-02-03)
#### Documentation
* **Macros:** adds a warning about changing values in Cargo.toml not triggering a rebuild automatically ([112aea3e](https://github.com/clap-rs/clap/commit/112aea3e42ae9e0c0a2d33ebad89496dbdd95e5d), closes [#838](https://github.com/clap-rs/clap/issues/838))
#### Bug Fixes
* fixes a println->debugln typo ([279aa62e](https://github.com/clap-rs/clap/commit/279aa62eaf08f56ce090ba16b937bc763cbb45be))
* fixes bash completions for commands that have an underscore in the name ([7f5cfa72](https://github.com/clap-rs/clap/commit/7f5cfa724f0ac4e098f5fe466c903febddb2d994), closes [#581](https://github.com/clap-rs/clap/issues/581))
* fixes a bug where ZSH completions would panic if the binary name had an underscore in it ([891a2a00](https://github.com/clap-rs/clap/commit/891a2a006f775e92c556dda48bb32fac9807c4fb), closes [#581](https://github.com/clap-rs/clap/issues/581))
* allow final word to be wrapped in wrap_help ([564c5f0f](https://github.com/clap-rs/clap/commit/564c5f0f1730f4a2c1cdd128664f1a981c31dcd4), closes [#828](https://github.com/clap-rs/clap/issues/828))
* fixes a bug where global args weren't included in the generated completion scripts ([9a1e006e](https://github.com/clap-rs/clap/commit/9a1e006eb75ad5a6057ebd119aa90f7e06c0ace8), closes [#841](https://github.com/clap-rs/clap/issues/841))
## v2.20.2 (2017-02-03)
#### Bug Fixes
* fixes a critical bug where subcommand settings were being propagated too far ([74648c94](https://github.com/clap-rs/clap/commit/74648c94b893df542bfa5bb595e68c7bb8167e36), closes [#832](https://github.com/clap-rs/clap/issues/832))
#### Improvements
* adds ArgGroup::multiple to the supported YAML fields for building ArgGroups from YAML ([d8590037](https://github.com/clap-rs/clap/commit/d8590037ce07dafd8cd5b26928aa4a9fd3018288), closes [#840](https://github.com/clap-rs/clap/issues/840))
## v2.20.1 (2017-01-31)
#### Bug Fixes
* allow final word to be wrapped in wrap_help ([564c5f0f](https://github.com/clap-rs/clap/commit/564c5f0f1730f4a2c1cdd128664f1a981c31dcd4), closes [#828](https://github.com/clap-rs/clap/issues/828))
* actually show character in debug output ([84d8c547](https://github.com/clap-rs/clap/commit/84d8c5476de95b7f37d61888bc4f13688b712434))
* include final character in line length ([aff4ba18](https://github.com/clap-rs/clap/commit/aff4ba18da8147e1259b04b0bfbc1fcb5c78a3c0))
#### Improvements
* updates libc and term_size deps for the libc version conflict ([6802ac4a](https://github.com/clap-rs/clap/commit/6802ac4a59c142cda9ec55ca0c45ae5cb9a6ab55))
#### Documentation
* fix link from app_from_crate! to crate_authors! (#822) ([5b29be9b](https://github.com/clap-rs/clap/commit/5b29be9b073330ab1f7227cdd19fe4aab39d5dcb))
* fix spelling of "guaranteed" ([4f30a65b](https://github.com/clap-rs/clap/commit/4f30a65b9c03eb09607eb91a929a6396637dc105))
#### New Settings
* **ArgsNegateSubcommands:** disables args being allowed between subcommands ([5e2af8c9](https://github.com/clap-rs/clap/commit/5e2af8c96adb5ab75fa2d1536237ebcb41869494), closes [#793](https://github.com/clap-rs/clap/issues/793))
* **DontCollapseArgsInUsage:** disables the collapsing of positional args into `[ARGS]` in the usage string ([c2978afc](https://github.com/clap-rs/clap/commit/c2978afc61fb46d5263ab3b2d87ecde1c9ce1553), closes [#769](https://github.com/clap-rs/clap/issues/769))
* **DisableHelpSubcommand:** disables building the `help` subcommand ([a10fc859](https://github.com/clap-rs/clap/commit/a10fc859ee20159fbd9ff4337be59b76467a64f2))
* **AllowMissingPositional:** allows one to implement `$ prog [optional] <required>` style CLIs where the second positional argument is required, but the first is optional ([1110fdc7](https://github.com/clap-rs/clap/commit/1110fdc7a345c108820dc45783a9bf893fa4c214), closes [#636](https://github.com/clap-rs/clap/issues/636))
* **PropagateGlobalValuesDown:** automatically propagats global arg's values down through *used* subcommands ([985536c8](https://github.com/clap-rs/clap/commit/985536c8ebcc09af98aac835f42a8072ad58c262), closes [#694](https://github.com/clap-rs/clap/issues/694))
#### API Additions
##### Arg
* **Arg::value_terminator:** adds the ability to terminate multiple values with a given string or char ([be64ce0c](https://github.com/clap-rs/clap/commit/be64ce0c373efc106384baca3f487ea99fe7b8cf), closes [#782](https://github.com/clap-rs/clap/issues/782))
* **Arg::default_value_if[s]:** adds new methods for *conditional* default values (such as a particular value from another argument was used) ([eb4010e7](https://github.com/clap-rs/clap/commit/eb4010e7b21724447ef837db11ac441915728f22))
* **Arg::requires_if[s]:** adds the ability to *conditionally* require additional args (such as if a particular value was used) ([198449d6](https://github.com/clap-rs/clap/commit/198449d64393c265f0bc327aaeac23ec4bb97226))
* **Arg::required_if[s]:** adds the ability for an arg to be *conditionally* required (i.e. "arg X is only required if arg Y was used with value Z") ([ee9cfddf](https://github.com/clap-rs/clap/commit/ee9cfddf345a6b5ae2af42ba72aa5c89e2ca7f59))
* **Arg::validator_os:** adds ability to validate values which may contain invalid UTF-8 ([47232498](https://github.com/clap-rs/clap/commit/47232498a813db4f3366ccd3e9faf0bff56433a4))
##### Macros
* **crate_description!:** Uses the `Cargo.toml` description field to fill in the `App::about` method at compile time ([4d9a82db](https://github.com/clap-rs/clap/commit/4d9a82db8e875e9b64a9c2a5c6e22c25afc1279d), closes [#778](https://github.com/clap-rs/clap/issues/778))
* **crate_name!:** Uses the `Cargo.toml` name field to fill in the `App::new` method at compile time ([4d9a82db](https://github.com/clap-rs/clap/commit/4d9a82db8e875e9b64a9c2a5c6e22c25afc1279d), closes [#778](https://github.com/clap-rs/clap/issues/778))
* **app_from_crate!:** Combines `crate_version!`, `crate_name!`, `crate_description!`, and `crate_authors!` into a single macro call to build a default `App` instance from the `Cargo.toml` fields ([4d9a82db](https://github.com/clap-rs/clap/commit/4d9a82db8e875e9b64a9c2a5c6e22c25afc1279d), closes [#778](https://github.com/clap-rs/clap/issues/778))
#### Features
* **no_cargo:** adds a `no_cargo` feature to disable Cargo-env-var-dependent macros for those *not* using `cargo` to build their crates (#786) ([6fdd2f9d](https://github.com/clap-rs/clap/commit/6fdd2f9d693aaf1118fc61bd362273950703f43d))
#### Bug Fixes
* **Options:** fixes a critical bug where options weren't forced to have a value ([5a5f2b1e](https://github.com/clap-rs/clap/commit/5a5f2b1e9f598a0d0280ef3e98abbbba2bc41132), closes [#665](https://github.com/clap-rs/clap/issues/665))
* fixes a bug where calling the help of a subcommand wasn't ignoring required args of parent commands ([d3d34a2b](https://github.com/clap-rs/clap/commit/d3d34a2b51ef31004055b0ab574f766d801c3adf), closes [#789](https://github.com/clap-rs/clap/issues/789))
* **Help Subcommand:** fixes a bug where the help subcommand couldn't be overridden ([d34ec3e0](https://github.com/clap-rs/clap/commit/d34ec3e032d03e402d8e87af9b2942fe2819b2da), closes [#787](https://github.com/clap-rs/clap/issues/787))
* **Low Index Multiples:** fixes a bug which caused combinations of LowIndexMultiples and `Arg::allow_hyphen_values` to fail parsing ([26c670ca](https://github.com/clap-rs/clap/commit/26c670ca16d2c80dc26d5c1ce83380ace6357318))
#### Improvements
* **Default Values:** improves the error message when default values are involved ([1f33de54](https://github.com/clap-rs/clap/commit/1f33de545036e7fd2f80faba251fca009bd519b8), closes [#774](https://github.com/clap-rs/clap/issues/774))
* **YAML:** adds conditional requirements and conditional default values to YAML ([9a4df327](https://github.com/clap-rs/clap/commit/9a4df327893486adb5558ffefba790c634ccdc6e), closes [#764](https://github.com/clap-rs/clap/issues/764))
* Support `--("some-arg-name")` syntax for defining long arg names when using `clap_app!` macro ([f41ec962](https://github.com/clap-rs/clap/commit/f41ec962c243a5ffff8b1be1ae2ad63970d3d1d4))
* Support `("some app name")` syntax for defining app names when using `clap_app!` macro ([9895b671](https://github.com/clap-rs/clap/commit/9895b671cff784f35cf56abcd8270f7c2ba09699), closes [#759](https://github.com/clap-rs/clap/issues/759))
* **Help Wrapping:** long app names (with spaces), authors, and descriptions are now wrapped appropriately ([ad4691b7](https://github.com/clap-rs/clap/commit/ad4691b71a63e951ace346318238d8834e04ad8a), closes [#777](https://github.com/clap-rs/clap/issues/777))
#### Documentation
* **Conditional Default Values:** fixes the failing doc tests of Arg::default_value_ifs ([4ef09101](https://github.com/clap-rs/clap/commit/4ef091019c083b4db1a0c13f1c1e95ac363259f2))
* **Conditional Requirements:** adds docs for Arg::requires_ifs ([7f296e29](https://github.com/clap-rs/clap/commit/7f296e29db7d9036e76e5dbcc9c8b20dfe7b25bd))
* **README.md:** fix some typos ([f22c21b4](https://github.com/clap-rs/clap/commit/f22c21b422d5b287d1a1ac183a379ee02eebf54f))
* **src/app/mod.rs:** fix some typos ([5c9b0d47](https://github.com/clap-rs/clap/commit/5c9b0d47ca78dea285c5b9dec79063d24c3e451a))
## v2.19.3 (2016-12-28)
#### Bug Fixes
* fixes a bug where calling the help of a subcommand wasn't ignoring required args of parent commands ([a0ee4993](https://github.com/clap-rs/clap/commit/a0ee4993015ea97b06b5bc9f378d8bcb18f1c51c), closes [#789](https://github.com/clap-rs/clap/issues/789))
## v2.19.2 (2016-12-08)
#### Bug Fixes
* **ZSH Completions:** escapes square brackets in ZSH completions ([7e17d5a3](https://github.com/clap-rs/clap/commit/7e17d5a36b2cc2cc77e7b15796b14d639ed3cbf7), closes [#771](https://github.com/clap-rs/clap/issues/771))
#### Documentation
* **Examples:** adds subcommand examples ([0e0f3354](https://github.com/clap-rs/clap/commit/0e0f33547a6901425afc1d9fbe19f7ae3832d9a4), closes [#766](https://github.com/clap-rs/clap/issues/766))
* **README.md:** adds guidance on when to use ~ in version pinning, and clarifies breaking change policy ([591eaefc](https://github.com/clap-rs/clap/commit/591eaefc7319142ba921130e502bb0729feed907), closes [#765](https://github.com/clap-rs/clap/issues/765))
## v2.19.1 (2016-12-01)
#### Bug Fixes
* **Help Messages:** fixes help message alignment when specific settings are used on options ([cd94b318](https://github.com/clap-rs/clap/commit/cd94b3188d63b63295a319e90e826bca46befcd2), closes [#760](https://github.com/clap-rs/clap/issues/760))
#### Improvements
* **Bash Completion:** allows bash completion to fall back to traditional bash completion upon no matching completing function ([b1b16d56](https://github.com/clap-rs/clap/commit/b1b16d56d8fddf819bdbe24b3724bb6a9f3fa613)))
## v2.19.0 (2016-11-21)
#### Features
* allows specifying AllowLeadingHyphen style values, but only for specific args vice command wide ([c0d70feb](https://github.com/clap-rs/clap/commit/c0d70febad9996a77a54107054daf1914c50d4ef), closes [#742](https://github.com/clap-rs/clap/issues/742))
#### Bug Fixes
* **Required Unless:** fixes a bug where having required_unless set doesn't work when conflicts are also set ([d20331b6](https://github.com/clap-rs/clap/commit/d20331b6f7940ac3a4e919999f8bb4780875125d), closes [#753](https://github.com/clap-rs/clap/issues/753))
* **ZSH Completions:** fixes an issue where zsh completions caused panics if there were no subcommands ([49e7cdab](https://github.com/clap-rs/clap/commit/49e7cdab76dd1ccc07221e360f07808ec62648aa), closes [#754](https://github.com/clap-rs/clap/issues/754))
#### Improvements
* **Validators:** improves the error messages for validators ([65eb3385](https://github.com/clap-rs/clap/commit/65eb33859d3ff53e7d3277f02a9d3fd9038a9dfb), closes [#744](https://github.com/clap-rs/clap/issues/744))
#### Documentation
* updates the docs landing page ([01e1e33f](https://github.com/clap-rs/clap/commit/01e1e33f377934099a4a725fab5cd6c5ff50eaa2))
* adds the macro version back to the readme ([45eb9bf1](https://github.com/clap-rs/clap/commit/45eb9bf130329c3f3853aba0342c2fe3c64ff80f))
* fix broken docs links ([808e7cee](https://github.com/clap-rs/clap/commit/808e7ceeb86d4a319bdc270f51c23a64621dbfb3))
* **Compatibility Policy:** adds an official compatibility policy to ([760d66dc](https://github.com/clap-rs/clap/commit/760d66dc17310b357f257776624151da933cd25d), closes [#740](https://github.com/clap-rs/clap/issues/740))
* **Contributing:** updates the readme to improve the readability and contributing sections ([eb51316c](https://github.com/clap-rs/clap/commit/eb51316cdfdc7258d287ba13b67ef2f42bd2b8f6))
## v2.18.0 (2016-11-05)
#### Features
* **Completions:** adds completion support for PowerShell. ([cff82c88](https://github.com/clap-rs/clap/commit/cff82c880e21064fca63351507b80350df6caadf), closes [#729](https://github.com/clap-rs/clap/issues/729))
## v2.17.1 (2016-11-02)
#### Bug Fixes
* **Low Index Multiples:** fixes a bug where using low index multiples was propagated to subcommands ([33924e88](https://github.com/clap-rs/clap/commit/33924e884461983c4e6b5ea1330fecc769a4ade7), closes [#725](https://github.com/clap-rs/clap/issues/725))
## v2.17.0 (2016-11-01)
#### Features
* **Positional Args:** allows specifying the second to last positional argument as multiple(true) ([1ced2a74](https://github.com/clap-rs/clap/commit/1ced2a7433ea8937a1b260ea65d708f32ca7c95e), closes [#725](https://github.com/clap-rs/clap/issues/725))
## v2.16.4 (2016-10-31)
#### Improvements
* **Error Output:** conflicting errors are now symmetrical, meaning more consistent and less confusing ([3d37001d](https://github.com/clap-rs/clap/commit/3d37001d1dc647d73cc597ff172f1072d4beb80d), closes [#718](https://github.com/clap-rs/clap/issues/718))
#### Documentation
* Fix typo in example `13a_enum_values_automatic` ([c22fbc07](https://github.com/clap-rs/clap/commit/c22fbc07356e556ffb5d1a79ec04597d149b915e))
* **README.md:** fixes failing yaml example (#715) ([21fba9e6](https://github.com/clap-rs/clap/commit/21fba9e6cd8c163012999cd0ce271ec8780c5695))
#### Bug Fixes
* **ZSH Completions:** fixes bug that caused panic on subcommands with aliases ([5c70e1a0](https://github.com/clap-rs/clap/commit/5c70e1a01bc977e44c10015d18bb8e215c32dfc8), closes [#714](https://github.com/clap-rs/clap/issues/714))
* **debug:** fixes the debug feature (#716) ([6c11ccf4](https://github.com/clap-rs/clap/commit/6c11ccf443d46258d51f7cda33fbcc81e7fe8e90))
## v2.16.3 (2016-10-28)
#### Bug Fixes
* Derive display order after propagation ([9cb6facf](https://github.com/clap-rs/clap/commit/9cb6facf507aff7cddd124b8c29714d2b0e7bd13), closes [#706](https://github.com/clap-rs/clap/issues/706))
* **yaml-example:** inconsistent args ([847f7199](https://github.com/clap-rs/clap/commit/847f7199219ead5065561d91d64780d99ae4b587))
## v2.16.2 (2016-10-25)
#### Bug Fixes
* **Fish Completions:** fixes a bug where single quotes are not escaped ([780b4a18](https://github.com/clap-rs/clap/commit/780b4a18281b6f7f7071e1b9db2290fae653c406), closes [#704](https://github.com/clap-rs/clap/issues/704))
## v2.16.1 (2016-10-24)
#### Bug Fixes
* **Help Message:** fixes a regression bug where args with multiple(true) threw off alignment ([ebddac79](https://github.com/clap-rs/clap/commit/ebddac791f3ceac193d5ad833b4b734b9643a7af), closes [#702](https://github.com/clap-rs/clap/issues/702))
## v2.16.0 (2016-10-23)
#### Features
* **Completions:** adds ZSH completion support ([3e36b0ba](https://github.com/clap-rs/clap/commit/3e36b0bac491d3f6194aee14604caf7be26b3d56), closes [#699](https://github.com/clap-rs/clap/issues/699))
## v2.15.0 (2016-10-21)
#### Features
* **AppSettings:** adds new setting `AppSettings::AllowNegativeNumbers` ([ab064546](https://github.com/clap-rs/clap/commit/ab06454677fb6aa9b9f804644fcca2168b1eaee3), closes [#696](https://github.com/clap-rs/clap/issues/696))
#### Documentation
* **app/settings.rs:** moves variants to roughly alphabetical order ([9ed4d4d7](https://github.com/clap-rs/clap/commit/9ed4d4d7957a23357aef60081e45639ab9e3905f))
## v2.14.1 (2016-10-20)
#### Documentation
* Improve documentation around features ([4ee85b95](https://github.com/clap-rs/clap/commit/4ee85b95d2d16708a016a3ba4e6e2c93b89b7fad))
* reword docs for ErrorKind and app::Settings ([3ccde7a4](https://github.com/clap-rs/clap/commit/3ccde7a4b8f7a2ea8b916a5415c04a8ff4b5cb7a))
* fix tests that fail when the "suggestions" feature is disabled ([996fc381](https://github.com/clap-rs/clap/commit/996fc381763a48d125c7ea8a58fed057fd0b4ac6))
* fix the OsString-using doc-tests ([af9e1a39](https://github.com/clap-rs/clap/commit/af9e1a393ce6cdda46a03c8a4f48df222b015a24))
* tag non-rust code blocks as such instead of ignoring them ([0ba9f4b1](https://github.com/clap-rs/clap/commit/0ba9f4b123f281952581b6dec948f7e51dd22890))
* **ErrorKind:** improve some errors about subcommands ([9f6217a4](https://github.com/clap-rs/clap/commit/9f6217a424da823343d7b801b9c350dee3cd1906))
* **yaml:** make sure the doc-tests don't fail before "missing file" ([8c0f5551](https://github.com/clap-rs/clap/commit/8c0f55516f4910c78c9f8a2bdbd822729574f95b))
#### Improvements
* Stabilize clap_app! ([cd516006](https://github.com/clap-rs/clap/commit/cd516006e35c37b005f329338560a0a53d1f3e00))
* **with_defaults:** Deprecate App::with_defaults() ([26085409](https://github.com/clap-rs/clap/commit/2608540940c8bb66e517b65706bc7dea55510682), closes [#638](https://github.com/clap-rs/clap/issues/638))
#### Bug Fixes
* fixes a bug that made determining when to auto-wrap long help messages inconsistent ([468baadb](https://github.com/clap-rs/clap/commit/468baadb8398fc1d37897b0c49374aef4cf97dca), closes [#688](https://github.com/clap-rs/clap/issues/688))
* **Completions:** fish completions for nested subcommands ([a61eaf8a](https://github.com/clap-rs/clap/commit/a61eaf8aade76cfe90ccc0f7125751ebf60e3254))
* **features:** Make lints not enable other nightly-requiring features ([835f75e3](https://github.com/clap-rs/clap/commit/835f75e3ba20999117363ed9f916464d777f36ef))
## v2.14.0 (2016-10-05)
#### Features
* **arg_aliases:** Ability to alias arguments ([33b5f6ef](https://github.com/clap-rs/clap/commit/33b5f6ef2c9612ecabb31f96b824793e46bfd3dd), closes [#669](https://github.com/clap-rs/clap/issues/669))
* **flag_aliases:** Ability to alias flags ([40d6dac9](https://github.com/clap-rs/clap/commit/40d6dac973927dded6ab423481634ef47ee7bfd7))
#### Bug Fixes
* **UsageParser:** Handle non-ascii names / options. ([1d6a7c6e](https://github.com/clap-rs/clap/commit/1d6a7c6e7e6aadc527346aa822f19d8587f714f3), closes [#664](https://github.com/clap-rs/clap/issues/664))
#### Documentation
* typo ([bac417fa](https://github.com/clap-rs/clap/commit/bac417fa1cea3d32308334c7cccfcf54546cd9d8))
## v2.13.0 (2016-09-18)
#### Documentation
* updates README.md with new website information and updated video tutorials info ([0c19c580](https://github.com/clap-rs/clap/commit/0c19c580cf50f1b82ff32f70b36708ae2bcac132))
* updates the docs about removing implicit value_delimiter(true) ([c81bc722](https://github.com/clap-rs/clap/commit/c81bc722ebb8a86d22be89b5aec98df9fe222a08))
* **Default Values:** adds better examples on using default values ([57a8d9ab](https://github.com/clap-rs/clap/commit/57a8d9abb2f973c235a8a14f8fc031673d7a7460), closes [#418](https://github.com/clap-rs/clap/issues/418))
#### Bug Fixes
* **Value Delimiters:** fixes the confusion around implicitly setting value delimiters. (default is now `false`) ([09d4d0a9](https://github.com/clap-rs/clap/commit/09d4d0a9038d7ce2df55c2aec95e16f36189fcee), closes [#666](https://github.com/clap-rs/clap/issues/666))
## v2.12.1 (2016-09-13)
#### Bug Fixes
* **Help Wrapping:** fixes a regression-bug where the old {n} newline char stopped working ([92ac353b](https://github.com/clap-rs/clap/commit/92ac353b48b7caa2511ad2a046d94da93c236cf6), closes [#661](https://github.com/clap-rs/clap/issues/661))
## v2.12.0 (2016-09-13)
#### Features
* **Help:** adds ability to hide the possible values on a per argument basis ([9151ef73](https://github.com/clap-rs/clap/commit/9151ef739871f2e74910c342299c0de196b95dec), closes [#640](https://github.com/clap-rs/clap/issues/640))
* **help:** allow for limiting detected terminal width ([a43e28af](https://github.com/clap-rs/clap/commit/a43e28af85c9a9deaedd5ef735f4f13008daab29), closes [#653](https://github.com/clap-rs/clap/issues/653))
#### Documentation
* **Help Wrapping:** removes the verbage about using `'{n}'` to insert newlines in help text ([c5a2b352](https://github.com/clap-rs/clap/commit/c5a2b352ca600f5b802290ad945731066cd53611))
* **Value Delimiters:** updates the docs for the Arg::multiple method WRT value delimiters and default settings ([f9d17a06](https://github.com/clap-rs/clap/commit/f9d17a060aa53f10d0a6e1a7eed5d989d1a59533))
* **appsettings:** Document AppSetting::DisableVersion ([94501965](https://github.com/clap-rs/clap/commit/945019654d2ca67eb2b1d6014fdf80b84d528d30), closes [#589](https://github.com/clap-rs/clap/issues/589))
#### Bug Fixes
* **AllowLeadingHyphen:** fixes a bug where valid args aren't recognized with this setting ([a9699e4d](https://github.com/clap-rs/clap/commit/a9699e4d7cdc9a06e73b845933ff1fe6d76f016a), closes [#588](https://github.com/clap-rs/clap/issues/588))
#### Improvements
* **Help Wrapping:**
* clap now ignores hard newlines in help messages and properly re-aligns text, but still wraps if the term width is too small ([c7678523](https://github.com/clap-rs/clap/commit/c76785239fd42adc8ca04f9202b6fec615aa9f14), closes [#617](https://github.com/clap-rs/clap/issues/617))
* makes some minor changes to when next line help is automatically used ([01cae799](https://github.com/clap-rs/clap/commit/01cae7990a33167ac35103fb36c811b4fe6eb98f))
* **Value Delimiters:** changes the default value delimiter rules ([f9e69254](https://github.com/clap-rs/clap/commit/f9e692548e8c94de15f909432de301407d6bb834), closes [#655](https://github.com/clap-rs/clap/issues/655))
* **YAML:** supports setting Arg::require_delimiter from YAML ([b9b55a39](https://github.com/clap-rs/clap/commit/b9b55a39dfebcdbdc05dca2692927e503db50816))
#### Performance
* **help:** fix redundant contains() checks ([a8afed74](https://github.com/clap-rs/clap/commit/a8afed7428bf0733f8e93bb11ad6c00d9e970fcc))
## v2.11.3 (2016-09-07)
#### Documentation
* **Help Wrapping:** removes the verbage about using `'{n}'` to insert newlines in help text ([c5a2b352](https://github.com/clap-rs/clap/commit/c5a2b352ca600f5b802290ad945731066cd53611))
#### Improvements
* **Help Wrapping:**
* clap now ignores hard newlines in help messages and properly re-aligns text, but still wraps if the term width is too small ([c7678523](https://github.com/clap-rs/clap/commit/c76785239fd42adc8ca04f9202b6fec615aa9f14), closes [#617](https://github.com/clap-rs/clap/issues/617))
* makes some minor changes to when next line help is automatically used ([01cae799](https://github.com/clap-rs/clap/commit/01cae7990a33167ac35103fb36c811b4fe6eb98f))
* **YAML:** supports setting Arg::require_delimiter from YAML ([b9b55a39](https://github.com/clap-rs/clap/commit/b9b55a39dfebcdbdc05dca2692927e503db50816))
## v2.11.2 (2016-09-06)
#### Improvements
* **Help Wrapping:** makes some minor changes to when next line help is automatically used ([5658b117](https://github.com/clap-rs/clap/commit/5658b117aec3e03adff9c8c52a4c4bc1fcb4e1ff))
## v2.11.1 (2016-09-05)
#### Bug Fixes
* **Settings:** fixes an issue where settings weren't propagated down through grandchild subcommands ([b3efc107](https://github.com/clap-rs/clap/commit/b3efc107515d78517b20798ff3890b8a2b04498e), closes [#638](https://github.com/clap-rs/clap/issues/638))
#### Features
* **Errors:** Errors with custom description ([58512f2f](https://github.com/clap-rs/clap/commit/58512f2fcb430745f1ee6ee8f1c67f62dc216c73))
#### Improvements
* **help:** use term_size instead of home-grown solution ([fc7327e9](https://github.com/clap-rs/clap/commit/fc7327e9dcf4258ef2baebf0a8714d9c0622855b))
## v2.11.0 (2016-08-28)
#### Bug Fixes
* **Groups:** fixes some usage strings that contain both args in groups and ones that conflict with each other ([3d782def](https://github.com/clap-rs/clap/commit/3d782def57725e2de26ca5a5bc5cc2e40ddebefb), closes [#616](https://github.com/clap-rs/clap/issues/616))
#### Documentation
* moves docs to docs.rs ([03209d5e](https://github.com/clap-rs/clap/commit/03209d5e1300906f00bafec1869c2047a92e5071), closes [#634](https://github.com/clap-rs/clap/issues/634))
#### Improvements
* **Completions:** uses standard conventions for bash completion files, namely '{bin}.bash-completion' ([27f5bbfb](https://github.com/clap-rs/clap/commit/27f5bbfbcc9474c2f57c2b92b1feb898ae46ee70), closes [#567](https://github.com/clap-rs/clap/issues/567))
* **Help:** automatically moves help text to the next line and wraps when term width is determined to be too small, or help text is too long ([150964c4](https://github.com/clap-rs/clap/commit/150964c4e7124d54476c9d9b4b3f2406f0fd00e5), closes [#597](https://github.com/clap-rs/clap/issues/597))
* **YAML Errors:** vastly improves error messages when using YAML ([f43b7c65](https://github.com/clap-rs/clap/commit/f43b7c65941c53adc0616b8646a21dc255862eb2), closes [#574](https://github.com/clap-rs/clap/issues/574))
#### Features
* adds App::with_defaults to automatically use crate_authors! and crate_version! macros ([5520bb01](https://github.com/clap-rs/clap/commit/5520bb012c127dfd299fd55699443c744d8dcd5b), closes [#600](https://github.com/clap-rs/clap/issues/600))
## v2.10.4 (2016-08-25)
#### Bug Fixes
* **Help Wrapping:** fixes a bug where help is wrapped incorrectly and causing a panic with some non-English characters ([d0b442c7](https://github.com/clap-rs/clap/commit/d0b442c7beeecac9764406bc3bd171ced0b8825e), closes [#626](https://github.com/clap-rs/clap/issues/626))
## v2.10.3 (2016-08-25)
#### Features
* **Help:** adds new short hand way to use source formatting and ignore term width in help messages ([7dfdaf20](https://github.com/clap-rs/clap/commit/7dfdaf200ebb5c431351a045b48f5e0f0d3f31db), closes [#625](https://github.com/clap-rs/clap/issues/625))
#### Documentation
* **Term Width:** adds details about set_term_width(0) ([00b8205d](https://github.com/clap-rs/clap/commit/00b8205d22639d1b54b9c453c55c785aace52cb2))
#### Bug Fixes
* **Unicode:** fixes two bugs where non-English characters were stripped or caused a panic with help wrapping ([763a5c92](https://github.com/clap-rs/clap/commit/763a5c920e23efc74d190af0cb8b5dd714b2d67a), closes [#626](https://github.com/clap-rs/clap/issues/626))
## v2.10.2 (2016-08-22)
#### Bug Fixes
* fixes a bug where the help is printed twice ([a643fb28](https://github.com/clap-rs/clap/commit/a643fb283acd9905dc727c4579c5c9fa2ceaa7e7), closes [#623](https://github.com/clap-rs/clap/issues/623))
## v2.10.1 (2016-08-21)
#### Bug Fixes
* **Help Subcommand:** fixes misleading usage string when using multi-level subcommmands ([e203515e](https://github.com/clap-rs/clap/commit/e203515e3ac495b405dbba4f78fb6af148fd282e), closes [#618](https://github.com/clap-rs/clap/issues/618))
#### Features
* **YAML:** allows using lists or single values with arg declarations ([9ade2cd4](https://github.com/clap-rs/clap/commit/9ade2cd4b268d6d7fe828319ce6a523c641b9c38), closes [#614](https://github.com/clap-rs/clap/issues/614), [#613](https://github.com/clap-rs/clap/issues/613))
## v2.10.0 (2016-07-29)
#### Features
* **Completions:** one can generate a basic fish completions script at compile time ([1979d2f2](https://github.com/clap-rs/clap/commit/1979d2f2f3216e57d02a97e624a8a8f6cf867ed9))
#### Bug Fixes
* **parser:** preserve external subcommand name ([875df243](https://github.com/clap-rs/clap/commit/875df24316c266920a073c13bbefbf546bc1f635))
#### Breaking Changes
* **parser:** preserve external subcommand name ([875df243](https://github.com/clap-rs/clap/commit/875df24316c266920a073c13bbefbf546bc1f635))
#### Documentation
* **YAML:** fixes example 17's incorrect reference to arg_groups instead of groups ([b6c99e13](https://github.com/clap-rs/clap/commit/b6c99e1377f918e78c16c8faced70a71607da931), closes [#601](https://github.com/clap-rs/clap/issues/601))
### 2.9.3 (2016-07-24)
#### Bug Fixes
* fixes bug where only first arg in list of required_unless_one is recognized ([1fc3b55b](https://github.com/clap-rs/clap/commit/1fc3b55bd6c8653b02e7c4253749c6b77737d2ac), closes [#575](https://github.com/clap-rs/clap/issues/575))
* **Settings:** fixes typo subcommandsrequired->subcommandrequired ([fc72cdf5](https://github.com/clap-rs/clap/commit/fc72cdf591d30f5d9375d0b5cc2a2ff3e812f9f6), closes [#593](https://github.com/clap-rs/clap/issues/593))
#### Features
* **Completions:** adds the ability to generate completions to io::Write object ([9f62cf73](https://github.com/clap-rs/clap/commit/9f62cf7378ba5acb5ce8c5bac89b4aa60c30755f))
* **Settings:** Add unset_setting and unset_settings fns to App (#598) ([0ceba231](https://github.com/clap-rs/clap/commit/0ceba231c6767cd6d88fdb1feeeea41deadf77ff), closes [#590](https://github.com/clap-rs/clap/issues/590))
### 2.9.2 (2016-07-03)
#### Documentation
* **Completions:** fixes the formatting of the Cargo.toml excerpt in the completions example ([722f2607](https://github.com/clap-rs/clap/commit/722f2607beaef56b6a0e433db5fd09492d9f028c))
#### Bug Fixes
* **Completions:** fixes bug where --help and --version short weren't added to the completion list ([e9f2438e](https://github.com/clap-rs/clap/commit/e9f2438e2ce99af0ae570a2eaf541fc7f55b771b), closes [#536](https://github.com/clap-rs/clap/issues/536))
### 2.9.1 (2016-07-02)
#### Improvements
* **Completions:** allows multiple completions to be built by namespacing with bin name ([57484b2d](https://github.com/clap-rs/clap/commit/57484b2daeaac01c1026e8c84efc8bf099e0eb31))
## v2.9.0 (2016-07-01)
#### Documentation
* **Completions:**
* fixes some errors in the completion docs ([9b359bf0](https://github.com/clap-rs/clap/commit/9b359bf06255d3dad8f489308044b60a9d1e6a87))
* adds documentation for completion scripts ([c6c519e4](https://github.com/clap-rs/clap/commit/c6c519e40efd6c4533a9ef5efe8e74fd150391b7))
#### Features
* **Completions:**
* one can now generate a bash completions script at compile time! ([e75b6c7b](https://github.com/clap-rs/clap/commit/e75b6c7b75f729afb9eb1d2a2faf61dca7674634), closes [#376](https://github.com/clap-rs/clap/issues/376))
* completions now include aliases to subcommands, including all subcommand options ([0ab9f840](https://github.com/clap-rs/clap/commit/0ab9f84052a8cf65b5551657f46c0c270841e634), closes [#556](https://github.com/clap-rs/clap/issues/556))
* completions now continue completing even after first completion ([18fc2e5b](https://github.com/clap-rs/clap/commit/18fc2e5b5af63bf54a94b72cec5e1223d49f4806))
* allows matching on possible values in options ([89cc2026](https://github.com/clap-rs/clap/commit/89cc2026ba9ac69cf44c5254360bbf99236d4f89), closes [#557](https://github.com/clap-rs/clap/issues/557))
#### Bug Fixes
* **AllowLeadingHyphen:** fixes an issue where isn't ignored like it should be with this setting ([96c24c9a](https://github.com/clap-rs/clap/commit/96c24c9a8fa1f85e06138d3cdd133e51659e19d2), closes [#558](https://github.com/clap-rs/clap/issues/558))
## v2.8.0 (2016-06-30)
#### Features
* **Arg:** adds new setting `Arg::require_delimiter` which requires val delimiter to parse multiple values ([920b5595](https://github.com/clap-rs/clap/commit/920b5595ed72abfb501ce054ab536067d8df2a66))
#### Bug Fixes
* Declare term::Winsize as repr(C) ([5d663d90](https://github.com/clap-rs/clap/commit/5d663d905c9829ce6e7a164f1f0896cdd70236dd))
#### Documentation
* **Arg:** adds docs for ([49af4e38](https://github.com/clap-rs/clap/commit/49af4e38a5dae2ab0a7fc3b4147e2c053d532484))
## v2.7.1 (2016-06-29)
#### Bug Fixes
* **Options:**
* options with multiple values and using delimiters no longer parse additional values after a trailing space ([cdc500bd](https://github.com/clap-rs/clap/commit/cdc500bdde6abe238c36ade406ddafc2bafff583))
* using options with multiple values and with an = no longer parse args after the trailing space as values ([290f61d0](https://github.com/clap-rs/clap/commit/290f61d07177413cf082ada55526d83405f6d011))
## v2.7.0 (2016-06-28)
#### Documentation
* fix typos ([43b3d40b](https://github.com/clap-rs/clap/commit/43b3d40b8c38b1571da75af86b5088be96cccec2))
* **ArgGroup:** vastly improves ArgGroup docs by adding better examples ([9e5f4f5d](https://github.com/clap-rs/clap/commit/9e5f4f5d734d630bca5535c3a0aa4fd4f9db3e39), closes [#534](https://github.com/clap-rs/clap/issues/534))
#### Features
* **ArgGroup:** one can now specify groups which require AT LEAST one of the args ([33689acc](https://github.com/clap-rs/clap/commit/33689acc689b217a8c0ee439f1b1225590c38355), closes [#533](https://github.com/clap-rs/clap/issues/533))
#### Bug Fixes
* **App:** using `App::print_help` now prints the same as would have been printed by `--help` or the like ([e84cc018](https://github.com/clap-rs/clap/commit/e84cc01836bbe0527e97de6db9889bd9e0fd6ba1), closes [#536](https://github.com/clap-rs/clap/issues/536))
* **Help:**
* prevents invoking <cmd> help help and displaying incorrect help message ([e3d2893f](https://github.com/clap-rs/clap/commit/e3d2893f377942a2d4cf3c6ff04524d0346e6fdb), closes [#538](https://github.com/clap-rs/clap/issues/538))
* subcommand help messages requested via <cmd> help <sub> now correctly match <cmd> <sub> --help ([08ad1cff](https://github.com/clap-rs/clap/commit/08ad1cff4fec57224ea957a2891a057b323c01bc), closes [#539](https://github.com/clap-rs/clap/issues/539))
#### Improvements
* **ArgGroup:** Add multiple ArgGroups per Arg ([902e182f](https://github.com/clap-rs/clap/commit/902e182f7a58aff11ff01e0a452abcdbdb2262aa), closes [#426](https://github.com/clap-rs/clap/issues/426))
* **Usage Strings:** `[FLAGS]` and `[ARGS]` are no longer blindly added to usage strings ([9b2e45b1](https://github.com/clap-rs/clap/commit/9b2e45b170aff567b038d8b3368880b6046c10c6), closes [#537](https://github.com/clap-rs/clap/issues/537))
* **arg_enum!:** allows using meta items like repr(C) with arg_enum!s ([edf9b233](https://github.com/clap-rs/clap/commit/edf9b2331c17a2cbcc13f961add4c55c2778e773), closes [#543](https://github.com/clap-rs/clap/issues/543))
## v2.6.0 (2016-06-14)
#### Improvements
* removes extra newline from help output ([86e61d19](https://github.com/clap-rs/clap/commit/86e61d19a748fb9870fcf1175308984e51ca1115))
* allows printing version to any io::Write object ([921f5f79](https://github.com/clap-rs/clap/commit/921f5f7916597f1d028cd4a65bfe76a01c801724))
* removes extra newline when printing version ([7e2e2cbb](https://github.com/clap-rs/clap/commit/7e2e2cbb4a8a0f050bb8072a376f742fc54b8589))
* **Aliases:** improves readability of asliases in help messages ([ca511de7](https://github.com/clap-rs/clap/commit/ca511de71f5b8c2ac419f1b188658e8c63b67846), closes [#526](https://github.com/clap-rs/clap/issues/526), [#529](https://github.com/clap-rs/clap/issues/529))
* **Usage Strings:** improves the default usage string when only a single positional arg is present ([ec86f2da](https://github.com/clap-rs/clap/commit/ec86f2dada1545a63fc72355e22fcdc4c466c215), closes [#518](https://github.com/clap-rs/clap/issues/518))
#### Features
* **Help:** allows wrapping at specified term width (Even on Windows!) ([1761dc0d](https://github.com/clap-rs/clap/commit/1761dc0d27d0d621229d792be40c36fbf65c3014), closes [#451](https://github.com/clap-rs/clap/issues/451))
* **Settings:**
* adds new setting to stop delimiting values with -- or TrailingVarArg ([fc3e0f5a](https://github.com/clap-rs/clap/commit/fc3e0f5afda6d24cdb3c4676614beebe13e1e870), closes [#511](https://github.com/clap-rs/clap/issues/511))
* one can now set an AppSetting which is propagated down through child subcommands ([e2341835](https://github.com/clap-rs/clap/commit/e23418351a3b98bf08dfd7744bc14377c70d59ee), closes [#519](https://github.com/clap-rs/clap/issues/519))
* **Subcommands:** adds support for visible aliases ([7b10e7f8](https://github.com/clap-rs/clap/commit/7b10e7f8937a07fdb8d16a6d8df79ce78d080cd3), closes [#522](https://github.com/clap-rs/clap/issues/522))
#### Bug Fixes
* fixes bug where args are printed out of order with templates ([05abb534](https://github.com/clap-rs/clap/commit/05abb534864764102031a0d402e64ac65867aa87))
* fixes bug where one can't override version or help flags ([90d7d6a2](https://github.com/clap-rs/clap/commit/90d7d6a2ea8240122dd9bf8d82d3c4f5ebb5c703), closes [#514](https://github.com/clap-rs/clap/issues/514))
* fixes issue where before_help wasn't printed ([b3faff60](https://github.com/clap-rs/clap/commit/b3faff6030f76a23f26afcfa6a90169002ed7106))
* **Help:** `App::before_help` and `App::after_help` now correctly wrap ([1f4da767](https://github.com/clap-rs/clap/commit/1f4da7676e6e71aa8dda799f3eeefad105a47819), closes [#516](https://github.com/clap-rs/clap/issues/516))
* **Settings:** fixes bug where new color settings couldn't be converted from strs ([706a7c11](https://github.com/clap-rs/clap/commit/706a7c11b0900be594de6d5a3121938eff197602))
* **Subcommands:** subcommands with aliases now display help of the aliased subcommand ([5354d14b](https://github.com/clap-rs/clap/commit/5354d14b51f189885ba110e01e6b76cca3752992), closes [#521](https://github.com/clap-rs/clap/issues/521))
* **Windows:** fixes a failing windows build ([01e7dfd6](https://github.com/clap-rs/clap/commit/01e7dfd6c07228c0be6695b3c7bf9370d82860d4))
* **YAML:** adds missing YAML methods for App and Arg ([e468faf3](https://github.com/clap-rs/clap/commit/e468faf3f05950fd9f72d84b69aa2061e91c6c64), closes [#528](https://github.com/clap-rs/clap/issues/528))
## v2.5.2 (2016-05-31)
#### Improvements
* removes extra newline from help output ([86e61d19](https://github.com/clap-rs/clap/commit/86e61d19a748fb9870fcf1175308984e51ca1115))
* allows printing version to any io::Write object ([921f5f79](https://github.com/clap-rs/clap/commit/921f5f7916597f1d028cd4a65bfe76a01c801724))
* removes extra newline when printing version ([7e2e2cbb](https://github.com/clap-rs/clap/commit/7e2e2cbb4a8a0f050bb8072a376f742fc54b8589))
#### Bug Fixes
* fixes bug where args are printed out of order with templates ([3935431d](https://github.com/clap-rs/clap/commit/3935431d5633f577c0826ae2142794b301f4b8ca))
* fixes bug where one can't override version or help flags ([90d7d6a2](https://github.com/clap-rs/clap/commit/90d7d6a2ea8240122dd9bf8d82d3c4f5ebb5c703), closes [#514](https://github.com/clap-rs/clap/issues/514))
* fixes issue where before_help wasn't printed ([b3faff60](https://github.com/clap-rs/clap/commit/b3faff6030f76a23f26afcfa6a90169002ed7106))
#### Documentation
* inter-links all types and pages ([3312893d](https://github.com/clap-rs/clap/commit/3312893ddaef3f44d68d8d26ed3d08010be50d97), closes [#505](https://github.com/clap-rs/clap/issues/505))
* makes all publicly available types viewable in docs ([52ca6505](https://github.com/clap-rs/clap/commit/52ca6505b4fec7b5c2d53d160c072d395eb21da6))
## v2.5.1 (2016-05-11)
#### Bug Fixes
* **Subcommand Aliases**: fixes lifetime issue when setting multiple aliases at once ([ac42f6cf0](https://github.com/clap-rs/clap/commit/ac42f6cf0de6c4920f703807d63061803930b18d))
## v2.5.0 (2016-05-10)
#### Improvements
* **SubCommand Aliases:** adds feature to yaml configs too ([69592195](https://github.com/clap-rs/clap/commit/695921954dde46dfd483399dcdef482c9dd7f34a))
#### Features
* **SubCommands:** adds support for subcommand aliases ([66b4dea6](https://github.com/clap-rs/clap/commit/66b4dea65c44d8f77ff522238a9237aed1bcab6d), closes [#469](https://github.com/clap-rs/clap/issues/469))
## v2.4.3 (2016-05-10)
#### Bug Fixes
* **Usage Strings:**
* now properly dedups args that are also in groups ([3ca0947c](https://github.com/clap-rs/clap/commit/3ca0947c166b4f8525752255e3a4fa6565eb9689), closes [#498](https://github.com/clap-rs/clap/issues/498))
* removes duplicate groups from usage strings ([f574fb8a](https://github.com/clap-rs/clap/commit/f574fb8a7cde4d4a2fa4c4481d59be2d0f135427))
#### Improvements
* **Groups:** formats positional args in groups in a better way ([fef11154](https://github.com/clap-rs/clap/commit/fef11154fb7430d1cbf04a672aabb366e456a368))
* **Help:**
* moves positionals to standard <> formatting ([03dfe5ce](https://github.com/clap-rs/clap/commit/03dfe5ceff1d63f172788ff688567ddad9fe119b))
* default help subcommand string has been shortened ([5b7fe8e4](https://github.com/clap-rs/clap/commit/5b7fe8e4161e43ab19e2e5fcf55fbe46791134e9), closes [#494](https://github.com/clap-rs/clap/issues/494))
## v2.4.3 (2016-05-10)
* Ghost Release
## v2.4.3 (2016-05-10)
* Ghost Release
## v2.4.0 (2016-05-02)
#### Features
* **Help:** adds support for displaying info before help message ([29fbfa3b](https://github.com/clap-rs/clap/commit/29fbfa3b963f2f3ca7704bf5d3e1201531baa373))
* **Required:** adds allowing args that are required unless certain args are present ([af1f7916](https://github.com/clap-rs/clap/commit/af1f79168390ea7da4074d0d9777de458ea64971))
#### Documentation
* hides formatting from docs ([cb708093](https://github.com/clap-rs/clap/commit/cb708093a7cd057f08c98b7bd1ed54c2db86ae7e))
* **required_unless:** adds docs and examples for required_unless ([ca727b52](https://github.com/clap-rs/clap/commit/ca727b52423b9883acd88b2f227b2711bc144573))
#### Bug Fixes
* **Required Args:** fixes issue where missing required args are sometimes duplicated in error messages ([3beebd81](https://github.com/clap-rs/clap/commit/3beebd81e7bc2faa4115ac109cf570e512c5477f), closes [#492](https://github.com/clap-rs/clap/issues/492))
## v2.3.0 (2016-04-18)
#### Improvements
* **macros.rs:** Added write_nspaces macro (a new version of write_spaces) ([9d757e86](https://github.com/clap-rs/clap/commit/9d757e8678e334e5a740ac750c76a9ed4e785cba))
* **parser.rs:**
* Provide a way to create a usage string without the USAGE: title ([a91d378b](https://github.com/clap-rs/clap/commit/a91d378ba0c91b5796457f8c6e881b13226ab735))
* Make Parser's create_usage public allowing to have function outside the parser to generate the help ([d51945f8](https://github.com/clap-rs/clap/commit/d51945f8b82ebb0963f4f40b384a9e8335783091))
* Expose Parser's flags, opts and positionals argument as iterators ([9b23e7ee](https://github.com/clap-rs/clap/commit/9b23e7ee40e51f7a823644c4496be955dc6c9d3a))
* **src/args:** Exposes argument display order by introducing a new Trait ([1321630e](https://github.com/clap-rs/clap/commit/1321630ef56955f152c73376d4d85cceb0bb4a12))
* **srs/args:** Added longest_filter to AnyArg trait ([65b3f667](https://github.com/clap-rs/clap/commit/65b3f667532685f854c699ddd264d326599cf7e5))
#### Features
* **Authors Macro:** adds a crate_authors macro ([38fb59ab](https://github.com/clap-rs/clap/commit/38fb59abf480eb2b6feca269097412f8b00b5b54), closes [#447](https://github.com/clap-rs/clap/issues/447))
* **HELP:**
* implements optional colored help messages ([abc8f669](https://github.com/clap-rs/clap/commit/abc8f669c3c8193ffc3a3b0ac6c3ac2198794d4f), closes [#483](https://github.com/clap-rs/clap/issues/483))
* Add a Templated Help system. ([81e121ed](https://github.com/clap-rs/clap/commit/81e121edd616f7285593f11120c63bcccae0d23e))
#### Bug Fixes
* **HELP:** Adjust Help to semantic changes introduced in 6933b84 ([8d23806b](https://github.com/clap-rs/clap/commit/8d23806bd67530ad412c34a1dcdcb1435555573d))
## v2.2.6 (2016-04-11)
#### Bug Fixes
* **Arg Groups**: fixes bug where arg name isn't printed properly ([3019a685](https://github.com/clap-rs/clap/commit/3019a685eee747ccbe6be09ad5dddce0b1d1d4db), closes [#476](https://github.com/clap-rs/clap/issues/476))
## v2.2.5 (2016-04-03)
#### Bug Fixes
* **Empty Values:** fixes bug where empty values weren't stored ([885d166f](https://github.com/clap-rs/clap/commit/885d166f04eb3fb581898ae5818c6c8032e5a686), closes [#470](https://github.com/clap-rs/clap/issues/470))
* **Help Message:** fixes bug where arg name is printed twice ([71acf1d5](https://github.com/clap-rs/clap/commit/71acf1d576946658b8bbdb5ae79e6716c43a030f), closes [#472](https://github.com/clap-rs/clap/issues/472))
## v2.2.4 (2016-03-30)
#### Bug Fixes
* fixes compiling with debug cargo feature ([d4b55450](https://github.com/clap-rs/clap/commit/d4b554509928031ac0808076178075bb21f8c1da))
* **Empty Values:** fixes bug where empty values weren't stored ([885d166f](https://github.com/clap-rs/clap/commit/885d166f04eb3fb581898ae5818c6c8032e5a686), closes [#470](https://github.com/clap-rs/clap/issues/470))
## v2.2.3 (2016-03-28)
#### Bug Fixes
* **Help Subcommand:** fixes issue where help and version flags weren't properly displayed ([205b07bf](https://github.com/clap-rs/clap/commit/205b07bf2e6547851f1290f8cd6b169145e144f1), closes [#466](https://github.com/clap-rs/clap/issues/466))
## v2.2.2 (2016-03-27)
#### Bug Fixes
* **Help Message:** fixes bug with wrapping in the middle of a unicode sequence ([05365ddc](https://github.com/clap-rs/clap/commit/05365ddcc252e4b49e7a75e199d6001a430bd84d), closes [#456](https://github.com/clap-rs/clap/issues/456))
* **Usage Strings:** fixes small bug where -- would appear needlessly in usage strings ([6933b849](https://github.com/clap-rs/clap/commit/6933b8491c2a7e28cdb61b47dcf10caf33c2f78a), closes [#461](https://github.com/clap-rs/clap/issues/461))
### 2.2.1 (2016-03-16)
#### Features
* **Help Message:** wraps and aligns the help message of subcommands ([813d75d0](https://github.com/clap-rs/clap/commit/813d75d06fbf077c65762608c0fa5e941cfc393c), closes [#452](https://github.com/clap-rs/clap/issues/452))
#### Bug Fixes
* **Help Message:** fixes a bug where small terminal sizes causing a loop ([1d73b035](https://github.com/clap-rs/clap/commit/1d73b0355236923aeaf6799abc759762ded7e1d0), closes [#453](https://github.com/clap-rs/clap/issues/453))
## v2.2.0 (2016-03-15)
#### Features
* **Help Message:** can auto wrap and aligning help text to term width ([e36af026](https://github.com/clap-rs/clap/commit/e36af0266635f23e85e951b9088d561e9a5d1bf6), closes [#428](https://github.com/clap-rs/clap/issues/428))
* **Help Subcommand:** adds support passing additional subcommands to help subcommand ([2c12757b](https://github.com/clap-rs/clap/commit/2c12757bbdf34ce481f3446c074e24c09c2e60fd), closes [#416](https://github.com/clap-rs/clap/issues/416))
* **Opts and Flags:** adds support for custom ordering in help messages ([9803b51e](https://github.com/clap-rs/clap/commit/9803b51e799904c0befaac457418ee766ccc1ab9))
* **Settings:** adds support for automatically deriving custom display order of args ([ad86e433](https://github.com/clap-rs/clap/commit/ad86e43334c4f70e86909689a088fb87e26ff95a), closes [#444](https://github.com/clap-rs/clap/issues/444))
* **Subcommands:** adds support for custom ordering in help messages ([7d2a2ed4](https://github.com/clap-rs/clap/commit/7d2a2ed413f5517d45988eef0765cdcd663b6372), closes [#442](https://github.com/clap-rs/clap/issues/442))
#### Bug Fixes
* **From Usage:** fixes a bug where adding empty lines weren't ignored ([c5c58c86](https://github.com/clap-rs/clap/commit/c5c58c86b9c503d8de19da356a5a5cffb59fbe84))
#### Documentation
* **Groups:** explains required ArgGroups better ([4ff0205b](https://github.com/clap-rs/clap/commit/4ff0205b85a45151b59bbaf090a89df13438380f), closes [#439](https://github.com/clap-rs/clap/issues/439))
## v2.1.2 (2016-02-24)
#### Bug Fixes
* **Nightly:** fixes failing nightly build ([d752c170](https://github.com/clap-rs/clap/commit/d752c17029598b19037710f204b7943f0830ae75), closes [#434](https://github.com/clap-rs/clap/issues/434))
## v2.1.1 (2016-02-19)
#### Documentation
* **AppSettings:** clarifies that AppSettings do not propagate ([3c8db0e9](https://github.com/clap-rs/clap/commit/3c8db0e9be1d24edaad364359513cbb02abb4186), closes [#429](https://github.com/clap-rs/clap/issues/429))
* **Arg Examples:** adds better examples ([1e79cccc](https://github.com/clap-rs/clap/commit/1e79cccc12937bc0e7cd2aad8e404410798e9fff))
#### Improvements
* **Help:** adds setting for next line help by arg ([066df748](https://github.com/clap-rs/clap/commit/066df7486e684cf50a8479a356a12ba972c34ce1), closes [#427](https://github.com/clap-
gitextract_6cj3b3in/ ├── .cargo/ │ └── config.toml ├── .clippy.toml ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.yml │ │ ├── config.yml │ │ └── feature_request.yml │ ├── PULL_REQUEST_TEMPLATE.md │ ├── renovate.json5 │ ├── settings.yml │ └── workflows/ │ ├── audit.yml │ ├── bench-baseline.yml │ ├── ci.yml │ ├── committed.yml │ ├── post-release.yml │ ├── pre-commit.yml │ ├── release-notes.py │ ├── rust-next.yml │ ├── spelling.yml │ └── template.yml ├── .gitignore ├── .pre-commit-config.yaml ├── CHANGELOG.md ├── CITATION.cff ├── CONTRIBUTING.md ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── Makefile ├── README.md ├── clap_bench/ │ ├── Cargo.toml │ ├── benches/ │ │ ├── complex.rs │ │ ├── empty.rs │ │ ├── ripgrep.rs │ │ ├── rustup.rs │ │ └── simple.rs │ └── src/ │ └── lib.rs ├── clap_builder/ │ ├── CONTRIBUTING.md │ ├── Cargo.toml │ ├── README.md │ └── src/ │ ├── builder/ │ │ ├── action.rs │ │ ├── app_settings.rs │ │ ├── arg.rs │ │ ├── arg_group.rs │ │ ├── arg_predicate.rs │ │ ├── arg_settings.rs │ │ ├── command.rs │ │ ├── debug_asserts.rs │ │ ├── ext.rs │ │ ├── mod.rs │ │ ├── os_str.rs │ │ ├── possible_value.rs │ │ ├── range.rs │ │ ├── resettable.rs │ │ ├── str.rs │ │ ├── styled_str.rs │ │ ├── styling.rs │ │ ├── tests.rs │ │ ├── value_hint.rs │ │ └── value_parser.rs │ ├── derive.rs │ ├── error/ │ │ ├── context.rs │ │ ├── format.rs │ │ ├── kind.rs │ │ └── mod.rs │ ├── lib.rs │ ├── macros.rs │ ├── mkeymap.rs │ ├── output/ │ │ ├── fmt.rs │ │ ├── help.rs │ │ ├── help_template.rs │ │ ├── mod.rs │ │ ├── textwrap/ │ │ │ ├── core.rs │ │ │ ├── mod.rs │ │ │ ├── word_separators.rs │ │ │ └── wrap_algorithms.rs │ │ └── usage.rs │ ├── parser/ │ │ ├── arg_matcher.rs │ │ ├── error.rs │ │ ├── features/ │ │ │ ├── mod.rs │ │ │ └── suggestions.rs │ │ ├── matches/ │ │ │ ├── arg_matches.rs │ │ │ ├── matched_arg.rs │ │ │ ├── mod.rs │ │ │ └── value_source.rs │ │ ├── mod.rs │ │ ├── parser.rs │ │ └── validator.rs │ └── util/ │ ├── any_value.rs │ ├── color.rs │ ├── escape.rs │ ├── flat_map.rs │ ├── flat_set.rs │ ├── graph.rs │ ├── id.rs │ ├── mod.rs │ └── str_to_bool.rs ├── clap_complete/ │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── Cargo.toml │ ├── README.md │ ├── examples/ │ │ ├── completion-derive.rs │ │ ├── completion.rs │ │ ├── dynamic.rs │ │ └── exhaustive.rs │ ├── src/ │ │ ├── aot/ │ │ │ ├── generator/ │ │ │ │ ├── mod.rs │ │ │ │ └── utils.rs │ │ │ ├── mod.rs │ │ │ └── shells/ │ │ │ ├── bash.rs │ │ │ ├── elvish.rs │ │ │ ├── fish.rs │ │ │ ├── mod.rs │ │ │ ├── powershell.rs │ │ │ ├── shell.rs │ │ │ └── zsh.rs │ │ ├── engine/ │ │ │ ├── candidate.rs │ │ │ ├── complete.rs │ │ │ ├── custom.rs │ │ │ └── mod.rs │ │ ├── env/ │ │ │ ├── mod.rs │ │ │ └── shells.rs │ │ ├── lib.rs │ │ └── macros.rs │ └── tests/ │ ├── examples.rs │ ├── snapshots/ │ │ ├── aliases.bash │ │ ├── aliases.elvish │ │ ├── aliases.fish │ │ ├── aliases.ps1 │ │ ├── aliases.zsh │ │ ├── basic.bash │ │ ├── basic.elvish │ │ ├── basic.fish │ │ ├── basic.ps1 │ │ ├── basic.zsh │ │ ├── custom_bin_name.bash │ │ ├── custom_bin_name.elvish │ │ ├── custom_bin_name.fish │ │ ├── custom_bin_name.ps1 │ │ ├── custom_bin_name.zsh │ │ ├── external_subcommands.bash │ │ ├── external_subcommands.elvish │ │ ├── external_subcommands.fish │ │ ├── external_subcommands.ps1 │ │ ├── external_subcommands.zsh │ │ ├── feature_sample.bash │ │ ├── feature_sample.elvish │ │ ├── feature_sample.fish │ │ ├── feature_sample.ps1 │ │ ├── feature_sample.zsh │ │ ├── home/ │ │ │ ├── .gitignore │ │ │ ├── dynamic-env/ │ │ │ │ └── exhaustive/ │ │ │ │ ├── bash/ │ │ │ │ │ └── .bashrc │ │ │ │ ├── elvish/ │ │ │ │ │ └── elvish/ │ │ │ │ │ └── rc.elv │ │ │ │ ├── fish/ │ │ │ │ │ └── fish/ │ │ │ │ │ ├── completions/ │ │ │ │ │ │ └── exhaustive.fish │ │ │ │ │ └── config.fish │ │ │ │ └── zsh/ │ │ │ │ ├── .zshenv │ │ │ │ └── zsh/ │ │ │ │ └── _exhaustive │ │ │ └── static/ │ │ │ └── exhaustive/ │ │ │ ├── bash/ │ │ │ │ ├── .bashrc │ │ │ │ └── .inputrc │ │ │ ├── elvish/ │ │ │ │ └── elvish/ │ │ │ │ └── rc.elv │ │ │ ├── fish/ │ │ │ │ └── fish/ │ │ │ │ ├── completions/ │ │ │ │ │ └── exhaustive.fish │ │ │ │ └── config.fish │ │ │ ├── powershell/ │ │ │ │ └── powershell/ │ │ │ │ └── Microsoft.PowerShell_profile.ps1 │ │ │ └── zsh/ │ │ │ ├── .zshenv │ │ │ └── zsh/ │ │ │ └── _exhaustive │ │ ├── multi_value_option.bash │ │ ├── multi_value_option.elvish │ │ ├── multi_value_option.fish │ │ ├── multi_value_option.ps1 │ │ ├── multi_value_option.zsh │ │ ├── optional_multi_value_option.bash │ │ ├── optional_multi_value_option.elvish │ │ ├── optional_multi_value_option.fish │ │ ├── optional_multi_value_option.ps1 │ │ ├── optional_multi_value_option.zsh │ │ ├── optional_value_option.bash │ │ ├── optional_value_option.elvish │ │ ├── optional_value_option.fish │ │ ├── optional_value_option.ps1 │ │ ├── optional_value_option.zsh │ │ ├── quoting.bash │ │ ├── quoting.elvish │ │ ├── quoting.fish │ │ ├── quoting.ps1 │ │ ├── quoting.zsh │ │ ├── register_dynamic.fish │ │ ├── register_minimal.bash │ │ ├── special_commands.bash │ │ ├── special_commands.elvish │ │ ├── special_commands.fish │ │ ├── special_commands.ps1 │ │ ├── special_commands.zsh │ │ ├── sub_subcommands.bash │ │ ├── sub_subcommands.elvish │ │ ├── sub_subcommands.fish │ │ ├── sub_subcommands.ps1 │ │ ├── sub_subcommands.zsh │ │ ├── subcommand_last.bash │ │ ├── subcommand_last.elvish │ │ ├── subcommand_last.fish │ │ ├── subcommand_last.ps1 │ │ ├── subcommand_last.zsh │ │ ├── two_multi_valued_arguments.bash │ │ ├── two_multi_valued_arguments.elvish │ │ ├── two_multi_valued_arguments.fish │ │ ├── two_multi_valued_arguments.ps1 │ │ ├── two_multi_valued_arguments.zsh │ │ ├── value_hint.bash │ │ ├── value_hint.elvish │ │ ├── value_hint.fish │ │ ├── value_hint.ps1 │ │ ├── value_hint.zsh │ │ ├── value_terminator.bash │ │ ├── value_terminator.elvish │ │ ├── value_terminator.fish │ │ ├── value_terminator.ps1 │ │ └── value_terminator.zsh │ └── testsuite/ │ ├── bash.rs │ ├── common.rs │ ├── elvish.rs │ ├── engine.rs │ ├── fish.rs │ ├── general.rs │ ├── main.rs │ ├── powershell.rs │ └── zsh.rs ├── clap_complete_nushell/ │ ├── CHANGELOG.md │ ├── Cargo.toml │ ├── README.md │ ├── examples/ │ │ ├── nushell_completion.rs │ │ ├── sub_subcommands.rs │ │ └── test.rs │ ├── src/ │ │ └── lib.rs │ └── tests/ │ ├── common.rs │ ├── completion.rs │ ├── nushell.rs │ └── snapshots/ │ ├── aliases.nu │ ├── basic.nu │ ├── feature_sample.nu │ ├── home/ │ │ └── static/ │ │ └── test/ │ │ └── nu/ │ │ └── .config/ │ │ └── nushell/ │ │ ├── completions/ │ │ │ └── test.nu │ │ └── config.nu │ ├── positional_index.nu │ ├── quoting.nu │ ├── special_commands.nu │ ├── sub_subcommands.nu │ └── value_hint.nu ├── clap_derive/ │ ├── CONTRIBUTING.md │ ├── Cargo.toml │ ├── README.md │ └── src/ │ ├── attr.rs │ ├── derives/ │ │ ├── args.rs │ │ ├── into_app.rs │ │ ├── mod.rs │ │ ├── parser.rs │ │ ├── subcommand.rs │ │ └── value_enum.rs │ ├── dummies.rs │ ├── item.rs │ ├── lib.rs │ ├── macros.rs │ └── utils/ │ ├── doc_comments.rs │ ├── error.rs │ ├── mod.rs │ ├── spanned.rs │ └── ty.rs ├── clap_lex/ │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── Cargo.toml │ ├── README.md │ ├── src/ │ │ ├── ext.rs │ │ └── lib.rs │ └── tests/ │ └── testsuite/ │ ├── lexer.rs │ ├── main.rs │ ├── parsed.rs │ └── shorts.rs ├── clap_mangen/ │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── Cargo.toml │ ├── README.md │ ├── examples/ │ │ └── man.rs │ ├── src/ │ │ ├── lib.rs │ │ └── render.rs │ └── tests/ │ ├── snapshots/ │ │ ├── aliases.bash.roff │ │ ├── basic.bash.roff │ │ ├── configured_display_order_args.roff │ │ ├── configured_subcmd_order.roff │ │ ├── default_subcmd_order.roff │ │ ├── feature_sample.bash.roff │ │ ├── help_headings.bash.roff │ │ ├── hidden_option.bash.roff │ │ ├── multiple_optional_values.bash.roff │ │ ├── optional_value.bash.roff │ │ ├── optional_with_required_equals_value.bash.roff │ │ ├── possible_values.bash.roff │ │ ├── quoting.bash.roff │ │ ├── special_commands.bash.roff │ │ ├── sub_subcommand_help.roff │ │ ├── sub_subcommands.bash.roff │ │ ├── value_env.bash.roff │ │ ├── value_hint.bash.roff │ │ ├── value_name_without_arg.bash.roff │ │ ├── value_with_required_equals.bash.roff │ │ └── variadic_values.bash.roff │ └── testsuite/ │ ├── common.rs │ ├── main.rs │ └── roff.rs ├── committed.toml ├── deny.toml ├── examples/ │ ├── README.md │ ├── cargo-example-derive.md │ ├── cargo-example-derive.rs │ ├── cargo-example.md │ ├── cargo-example.rs │ ├── demo.md │ ├── demo.rs │ ├── derive_ref/ │ │ ├── augment_args.rs │ │ ├── augment_subcommands.rs │ │ ├── flatten_hand_args.rs │ │ ├── hand_subcommand.rs │ │ └── interop_tests.md │ ├── escaped-positional-derive.md │ ├── escaped-positional-derive.rs │ ├── escaped-positional.md │ ├── escaped-positional.rs │ ├── find.md │ ├── find.rs │ ├── git-derive.md │ ├── git-derive.rs │ ├── git.md │ ├── git.rs │ ├── multicall-busybox.md │ ├── multicall-busybox.rs │ ├── multicall-hostname.md │ ├── multicall-hostname.rs │ ├── pacman.md │ ├── pacman.rs │ ├── repl-derive.rs │ ├── repl.rs │ ├── tutorial_builder/ │ │ ├── 01_quick.md │ │ ├── 01_quick.rs │ │ ├── 02_app_settings.md │ │ ├── 02_app_settings.rs │ │ ├── 02_apps.md │ │ ├── 02_apps.rs │ │ ├── 02_crate.md │ │ ├── 02_crate.rs │ │ ├── 03_01_flag_bool.md │ │ ├── 03_01_flag_bool.rs │ │ ├── 03_01_flag_count.md │ │ ├── 03_01_flag_count.rs │ │ ├── 03_02_option.md │ │ ├── 03_02_option.rs │ │ ├── 03_02_option_mult.md │ │ ├── 03_02_option_mult.rs │ │ ├── 03_03_positional.md │ │ ├── 03_03_positional.rs │ │ ├── 03_03_positional_mult.md │ │ ├── 03_03_positional_mult.rs │ │ ├── 03_04_subcommands.md │ │ ├── 03_04_subcommands.rs │ │ ├── 03_05_default_values.md │ │ ├── 03_05_default_values.rs │ │ ├── 03_06_required.md │ │ ├── 03_06_required.rs │ │ ├── 04_01_enum.md │ │ ├── 04_01_enum.rs │ │ ├── 04_01_possible.md │ │ ├── 04_01_possible.rs │ │ ├── 04_02_parse.md │ │ ├── 04_02_parse.rs │ │ ├── 04_02_validate.md │ │ ├── 04_02_validate.rs │ │ ├── 04_03_relations.md │ │ ├── 04_03_relations.rs │ │ ├── 04_04_custom.md │ │ ├── 04_04_custom.rs │ │ └── 05_01_assert.rs │ ├── tutorial_derive/ │ │ ├── 01_quick.md │ │ ├── 01_quick.rs │ │ ├── 02_app_settings.md │ │ ├── 02_app_settings.rs │ │ ├── 02_apps.md │ │ ├── 02_apps.rs │ │ ├── 02_crate.md │ │ ├── 02_crate.rs │ │ ├── 03_01_flag_bool.md │ │ ├── 03_01_flag_bool.rs │ │ ├── 03_01_flag_count.md │ │ ├── 03_01_flag_count.rs │ │ ├── 03_02_option.md │ │ ├── 03_02_option.rs │ │ ├── 03_02_option_mult.md │ │ ├── 03_02_option_mult.rs │ │ ├── 03_03_positional.md │ │ ├── 03_03_positional.rs │ │ ├── 03_03_positional_mult.md │ │ ├── 03_03_positional_mult.rs │ │ ├── 03_04_subcommands.md │ │ ├── 03_04_subcommands.rs │ │ ├── 03_04_subcommands_alt.rs │ │ ├── 03_05_default_values.md │ │ ├── 03_05_default_values.rs │ │ ├── 03_06_optional.md │ │ ├── 03_06_optional.rs │ │ ├── 04_01_enum.md │ │ ├── 04_01_enum.rs │ │ ├── 04_02_parse.md │ │ ├── 04_02_parse.rs │ │ ├── 04_02_validate.md │ │ ├── 04_02_validate.rs │ │ ├── 04_03_relations.md │ │ ├── 04_03_relations.rs │ │ ├── 04_04_custom.md │ │ ├── 04_04_custom.rs │ │ └── 05_01_assert.rs │ └── typed-derive/ │ ├── builtin.md │ ├── builtin.rs │ ├── custom.md │ ├── custom.rs │ ├── fn_parser.md │ ├── fn_parser.rs │ ├── foreign_crate.rs │ ├── implicit.md │ ├── implicit.rs │ └── main.rs ├── release.toml ├── src/ │ ├── _concepts.rs │ ├── _cookbook/ │ │ ├── cargo_example.rs │ │ ├── cargo_example_derive.rs │ │ ├── escaped_positional.rs │ │ ├── escaped_positional_derive.rs │ │ ├── find.rs │ │ ├── git.rs │ │ ├── git_derive.rs │ │ ├── mod.rs │ │ ├── multicall_busybox.rs │ │ ├── multicall_hostname.rs │ │ ├── pacman.rs │ │ ├── repl.rs │ │ ├── repl_derive.rs │ │ └── typed_derive.rs │ ├── _derive/ │ │ ├── _tutorial.rs │ │ └── mod.rs │ ├── _faq.rs │ ├── _features.rs │ ├── _tutorial.rs │ ├── bin/ │ │ └── stdio-fixture.rs │ └── lib.rs ├── tests/ │ ├── builder/ │ │ ├── action.rs │ │ ├── app_settings.rs │ │ ├── arg_aliases.rs │ │ ├── arg_aliases_short.rs │ │ ├── arg_matches.rs │ │ ├── borrowed.rs │ │ ├── cargo.rs │ │ ├── command.rs │ │ ├── conflicts.rs │ │ ├── default_missing_vals.rs │ │ ├── default_vals.rs │ │ ├── delimiters.rs │ │ ├── derive_order.rs │ │ ├── display_order.rs │ │ ├── double_require.rs │ │ ├── empty_values.rs │ │ ├── env.rs │ │ ├── error.rs │ │ ├── flag_subcommands.rs │ │ ├── flags.rs │ │ ├── global_args.rs │ │ ├── groups.rs │ │ ├── help.rs │ │ ├── help_env.rs │ │ ├── hidden_args.rs │ │ ├── ignore_errors.rs │ │ ├── indices.rs │ │ ├── macros.rs │ │ ├── main.rs │ │ ├── multiple_occurrences.rs │ │ ├── multiple_values.rs │ │ ├── occurrences.rs │ │ ├── opts.rs │ │ ├── positionals.rs │ │ ├── posix_compatible.rs │ │ ├── possible_values.rs │ │ ├── propagate_globals.rs │ │ ├── require.rs │ │ ├── subcommands.rs │ │ ├── template_help.rs │ │ ├── tests.rs │ │ ├── unicode.rs │ │ ├── unique_args.rs │ │ ├── utf16.rs │ │ ├── utf8.rs │ │ ├── utils.rs │ │ └── version.rs │ ├── derive/ │ │ ├── app_name.rs │ │ ├── arguments.rs │ │ ├── author_version_about.rs │ │ ├── basic.rs │ │ ├── boxed.rs │ │ ├── custom_string_parsers.rs │ │ ├── default_value.rs │ │ ├── deny_warnings.rs │ │ ├── doc_comments_help.rs │ │ ├── explicit_name_no_renaming.rs │ │ ├── flags.rs │ │ ├── flatten.rs │ │ ├── generic.rs │ │ ├── groups.rs │ │ ├── help.rs │ │ ├── issues.rs │ │ ├── macros.rs │ │ ├── main.rs │ │ ├── markdown.rs │ │ ├── naming.rs │ │ ├── nested_subcommands.rs │ │ ├── non_literal_attributes.rs │ │ ├── occurrences.rs │ │ ├── options.rs │ │ ├── privacy.rs │ │ ├── raw_bool_literal.rs │ │ ├── raw_idents.rs │ │ ├── rename_all_env.rs │ │ ├── skip.rs │ │ ├── subcommands.rs │ │ ├── type_alias_regressions.rs │ │ ├── utf8.rs │ │ ├── utils.rs │ │ └── value_enum.rs │ ├── derive_ui/ │ │ ├── bool_value_enum.rs │ │ ├── bool_value_enum.stderr │ │ ├── clap_empty_attr.rs │ │ ├── clap_empty_attr.stderr │ │ ├── default_value_t_invalid.rs │ │ ├── default_value_t_invalid.stderr │ │ ├── default_values_t_invalid.rs │ │ ├── default_values_t_invalid.stderr │ │ ├── enum_flatten.rs │ │ ├── enum_flatten.stderr │ │ ├── enum_variant_not_args.rs │ │ ├── enum_variant_not_args.stderr │ │ ├── external_subcommand_misuse.rs │ │ ├── external_subcommand_misuse.stderr │ │ ├── external_subcommand_wrong_type.rs │ │ ├── external_subcommand_wrong_type.stderr │ │ ├── flatten_and_methods.rs │ │ ├── flatten_and_methods.stderr │ │ ├── flatten_enum_in_struct.rs │ │ ├── flatten_enum_in_struct.stderr │ │ ├── flatten_struct_in_enum.rs │ │ ├── flatten_struct_in_enum.stderr │ │ ├── group_name_attribute.rs │ │ ├── group_name_attribute.stderr │ │ ├── multiple_external_subcommand.rs │ │ ├── multiple_external_subcommand.stderr │ │ ├── non_existent_attr.rs │ │ ├── non_existent_attr.stderr │ │ ├── rename_all_wrong_casing.rs │ │ ├── rename_all_wrong_casing.stderr │ │ ├── skip_flatten.rs │ │ ├── skip_flatten.stderr │ │ ├── skip_subcommand.rs │ │ ├── skip_subcommand.stderr │ │ ├── skip_with_other_options.rs │ │ ├── skip_with_other_options.stderr │ │ ├── skip_without_default.rs │ │ ├── skip_without_default.stderr │ │ ├── struct_subcommand.rs │ │ ├── struct_subcommand.stderr │ │ ├── subcommand_and_flatten.rs │ │ ├── subcommand_and_flatten.stderr │ │ ├── subcommand_and_methods.rs │ │ ├── subcommand_and_methods.stderr │ │ ├── subcommand_on_struct.rs │ │ ├── subcommand_on_struct.stderr │ │ ├── subcommand_opt_opt.rs │ │ ├── subcommand_opt_opt.stderr │ │ ├── subcommand_opt_vec.rs │ │ ├── subcommand_opt_vec.stderr │ │ ├── tuple_struct.rs │ │ ├── tuple_struct.stderr │ │ ├── value_enum_non_unit.rs │ │ ├── value_enum_non_unit.stderr │ │ ├── value_enum_on_struct.rs │ │ ├── value_enum_on_struct.stderr │ │ ├── value_parser_unsupported.rs │ │ └── value_parser_unsupported.stderr │ ├── derive_ui.rs │ ├── examples.rs │ ├── macros.rs │ ├── ui/ │ │ ├── V_flag_stdout.toml │ │ ├── arg_required_else_help_stderr.toml │ │ ├── error_stderr.toml │ │ ├── h_flag_stdout.toml │ │ ├── help_cmd_stdout.toml │ │ ├── help_flag_stdout.toml │ │ └── version_flag_stdout.toml │ └── ui.rs └── typos.toml
Showing preview only (338K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3994 symbols across 292 files)
FILE: .github/workflows/release-notes.py
function main (line 12) | def main():
FILE: clap_bench/benches/complex.rs
function build (line 45) | fn build() -> Command {
function startup (line 50) | fn startup(args: &Args) -> ArgMatches {
function render_help (line 55) | fn render_help(bencher: divan::Bencher) {
function build_help (line 60) | fn build_help(cmd: &mut Command) -> String {
constant COMPLEX_ARGS (line 65) | const COMPLEX_ARGS: &[Args] = &[
type Args (line 118) | pub struct Args(&'static str, &'static [&'static str]);
method name (line 121) | pub const fn name(&self) -> &'static str {
method args (line 125) | pub const fn args(&self) -> &[&str] {
method fmt (line 131) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
function main (line 136) | fn main() {
FILE: clap_bench/benches/empty.rs
function build (line 11) | fn build() -> Command {
function startup (line 16) | fn startup() -> ArgMatches {
function render_help (line 21) | fn render_help(bencher: divan::Bencher) {
function build_help (line 26) | fn build_help(cmd: &mut Command) -> String {
function main (line 31) | fn main() {
FILE: clap_bench/benches/ripgrep.rs
function short_help (line 17) | fn short_help() -> Command {
function long_help (line 22) | fn long_help() -> Command {
function short_help (line 31) | fn short_help(bencher: divan::Bencher) {
function long_help (line 37) | fn long_help(bencher: divan::Bencher) {
function simple (line 47) | fn simple() -> ArgMatches {
function complex (line 52) | fn complex() -> ArgMatches {
function xargs (line 69) | fn xargs() -> ArgMatches {
constant ABOUT (line 235) | const ABOUT: &str = "
constant USAGE (line 246) | const USAGE: &str = "
constant TEMPLATE (line 252) | const TEMPLATE: &str = "\
function app_short (line 266) | fn app_short() -> Command {
function app_long (line 271) | fn app_long() -> Command {
function build_help (line 276) | fn build_help(cmd: &mut Command) -> String {
function cmd (line 288) | fn cmd<F>(_next_line_help: bool, doc: F) -> Command
type Usage (line 466) | struct Usage {
function main (line 926) | fn main() {
FILE: clap_bench/benches/rustup.rs
function build (line 10) | fn build() -> Command {
function empty (line 18) | fn empty() -> ArgMatches {
function sc (line 23) | fn sc() -> ArgMatches {
function build_cli (line 28) | fn build_cli() -> Command {
function main (line 442) | fn main() {
FILE: clap_bench/benches/simple.rs
function build (line 18) | fn build() -> Command {
function flag (line 26) | fn flag() -> ArgMatches {
function opt (line 31) | fn opt() -> ArgMatches {
function pos (line 36) | fn pos() -> ArgMatches {
function render_help (line 42) | fn render_help(bencher: divan::Bencher) {
function build_help (line 47) | fn build_help(cmd: &mut Command) -> String {
function main (line 52) | fn main() {
FILE: clap_builder/src/builder/action.rs
type ArgAction (line 34) | pub enum ArgAction {
method takes_values (line 360) | pub fn takes_values(&self) -> bool {
method max_num_args (line 375) | pub(crate) fn max_num_args(&self) -> ValueRange {
method default_num_args (line 389) | pub(crate) fn default_num_args(&self) -> ValueRange {
method default_value (line 403) | pub(crate) fn default_value(&self) -> Option<&'static std::ffi::OsStr> {
method default_missing_value (line 417) | pub(crate) fn default_missing_value(&self) -> Option<&'static std::ffi...
method default_value_parser (line 431) | pub(crate) fn default_value_parser(&self) -> Option<super::ValueParser> {
method value_type_id (line 446) | pub(crate) fn value_type_id(&self) -> Option<AnyValueId> {
type CountType (line 461) | pub(crate) type CountType = u8;
FILE: clap_builder/src/builder/app_settings.rs
type AppFlags (line 7) | pub(crate) struct AppFlags(u32);
method set (line 10) | pub(crate) fn set(&mut self, setting: AppSettings) {
method unset (line 14) | pub(crate) fn unset(&mut self, setting: AppSettings) {
method is_set (line 18) | pub(crate) fn is_set(&self, setting: AppSettings) -> bool {
method insert (line 22) | pub(crate) fn insert(&mut self, other: Self) {
type Output (line 28) | type Output = Self;
method bitor (line 30) | fn bitor(mut self, rhs: Self) -> Self::Output {
type AppSettings (line 48) | pub(crate) enum AppSettings {
method bit (line 85) | fn bit(self) -> u32 {
FILE: clap_builder/src/builder/arg.rs
type Arg (line 60) | pub struct Arg {
method new (line 122) | pub fn new(id: impl Into<Id>) -> Self {
method id (line 130) | pub fn id(mut self, id: impl Into<Id>) -> Self {
method short (line 182) | pub fn short(mut self, s: impl IntoResettable<char>) -> Self {
method long (line 228) | pub fn long(mut self, l: impl IntoResettable<Str>) -> Self {
method alias (line 254) | pub fn alias(mut self, name: impl IntoResettable<Str>) -> Self {
method short_alias (line 284) | pub fn short_alias(mut self, name: impl IntoResettable<char>) -> Self {
method aliases (line 317) | pub fn aliases(mut self, names: impl IntoIterator<Item = impl Into<Str...
method short_aliases (line 346) | pub fn short_aliases(mut self, names: impl IntoIterator<Item = char>) ...
method visible_alias (line 375) | pub fn visible_alias(mut self, name: impl IntoResettable<Str>) -> Self {
method visible_short_alias (line 404) | pub fn visible_short_alias(mut self, name: impl IntoResettable<char>) ...
method visible_aliases (line 435) | pub fn visible_aliases(mut self, names: impl IntoIterator<Item = impl ...
method visible_short_aliases (line 461) | pub fn visible_short_aliases(mut self, names: impl IntoIterator<Item =...
method index (line 539) | pub fn index(mut self, idx: impl IntoResettable<usize>) -> Self {
method trailing_var_arg (line 580) | pub fn trailing_var_arg(self, yes: bool) -> Self {
method last (line 689) | pub fn last(self, yes: bool) -> Self {
method required (line 755) | pub fn required(self, yes: bool) -> Self {
method requires (line 825) | pub fn requires(mut self, arg_id: impl IntoResettable<Id>) -> Self {
method exclusive (line 869) | pub fn exclusive(self, yes: bool) -> Self {
method global (line 917) | pub fn global(self, yes: bool) -> Self {
method is_set (line 926) | pub(crate) fn is_set(&self, s: ArgSettings) -> bool {
method setting (line 932) | pub(crate) fn setting(mut self, setting: ArgSettings) -> Self {
method unset_setting (line 939) | pub(crate) fn unset_setting(mut self, setting: ArgSettings) -> Self {
method add (line 947) | pub fn add<T: ArgExt + Extension>(mut self, tagged: T) -> Self {
method action (line 986) | pub fn action(mut self, action: impl IntoResettable<ArgAction>) -> Self {
method value_parser (line 1048) | pub fn value_parser(mut self, parser: impl IntoResettable<super::Value...
method num_args (line 1209) | pub fn num_args(mut self, qty: impl IntoResettable<ValueRange>) -> Self {
method number_of_values (line 1219) | pub fn number_of_values(self, qty: usize) -> Self {
method value_name (line 1277) | pub fn value_name(mut self, name: impl IntoResettable<Str>) -> Self {
method value_names (line 1351) | pub fn value_names(mut self, names: impl IntoIterator<Item = impl Into...
method value_hint (line 1392) | pub fn value_hint(mut self, value_hint: impl IntoResettable<ValueHint>...
method ignore_case (line 1465) | pub fn ignore_case(self, yes: bool) -> Self {
method allow_hyphen_values (line 1541) | pub fn allow_hyphen_values(self, yes: bool) -> Self {
method allow_negative_numbers (line 1575) | pub fn allow_negative_numbers(self, yes: bool) -> Self {
method require_equals (line 1633) | pub fn require_equals(self, yes: bool) -> Self {
method use_value_delimiter (line 1646) | pub fn use_value_delimiter(mut self, yes: bool) -> Self {
method value_delimiter (line 1682) | pub fn value_delimiter(mut self, d: impl IntoResettable<char>) -> Self {
method value_terminator (line 1745) | pub fn value_terminator(mut self, term: impl IntoResettable<Str>) -> S...
method raw (line 1778) | pub fn raw(mut self, yes: bool) -> Self {
method default_value (line 1851) | pub fn default_value(mut self, val: impl IntoResettable<OsStr>) -> Self {
method default_value_os (line 1867) | pub fn default_value_os(self, val: impl Into<OsStr>) -> Self {
method default_values (line 1878) | pub fn default_values(mut self, vals: impl IntoIterator<Item = impl In...
method default_values_os (line 1890) | pub fn default_values_os(self, vals: impl IntoIterator<Item = impl Int...
method default_missing_value (line 1993) | pub fn default_missing_value(mut self, val: impl IntoResettable<OsStr>...
method default_missing_value_os (line 2010) | pub fn default_missing_value_os(self, val: impl Into<OsStr>) -> Self {
method default_missing_values (line 2021) | pub fn default_missing_values(self, vals: impl IntoIterator<Item = imp...
method default_missing_values_os (line 2033) | pub fn default_missing_values_os(
method env (line 2205) | pub fn env(mut self, name: impl IntoResettable<OsStr>) -> Self {
method env_os (line 2221) | pub fn env_os(self, name: impl Into<OsStr>) -> Self {
method help (line 2278) | pub fn help(mut self, h: impl IntoResettable<StyledStr>) -> Self {
method long_help (line 2346) | pub fn long_help(mut self, h: impl IntoResettable<StyledStr>) -> Self {
method display_order (line 2417) | pub fn display_order(mut self, ord: impl IntoResettable<usize>) -> Self {
method help_heading (line 2428) | pub fn help_heading(mut self, heading: impl IntoResettable<Str>) -> Se...
method next_line_help (line 2484) | pub fn next_line_help(self, yes: bool) -> Self {
method hide (line 2532) | pub fn hide(self, yes: bool) -> Self {
method hide_possible_values (line 2570) | pub fn hide_possible_values(self, yes: bool) -> Self {
method hide_default_value (line 2606) | pub fn hide_default_value(self, yes: bool) -> Self {
method hide_env (line 2636) | pub fn hide_env(self, yes: bool) -> Self {
method hide_env_values (line 2667) | pub fn hide_env_values(self, yes: bool) -> Self {
method hide_short_help (line 2759) | pub fn hide_short_help(self, yes: bool) -> Self {
method hide_long_help (line 2844) | pub fn hide_long_help(self, yes: bool) -> Self {
method group (line 2892) | pub fn group(mut self, group_id: impl IntoResettable<Id>) -> Self {
method groups (line 2939) | pub fn groups(mut self, group_ids: impl IntoIterator<Item = impl Into<...
method default_value_if (line 3064) | pub fn default_value_if(
method default_values_if (line 3110) | pub fn default_values_if(
method default_value_if_os (line 3130) | pub fn default_value_if_os(
method default_value_ifs (line 3230) | pub fn default_value_ifs(
method default_values_ifs (line 3252) | pub fn default_values_ifs(
method default_value_ifs_os (line 3274) | pub fn default_value_ifs_os(
method required_unless_present (line 3348) | pub fn required_unless_present(mut self, arg_id: impl IntoResettable<I...
method required_unless_present_all (line 3432) | pub fn required_unless_present_all(
method required_unless_present_any (line 3517) | pub fn required_unless_present_any(
method required_if_eq (line 3607) | pub fn required_if_eq(mut self, arg_id: impl Into<Id>, val: impl Into<...
method required_if_eq_any (line 3689) | pub fn required_if_eq_any(
method required_if_eq_all (line 3773) | pub fn required_if_eq_all(
method requires_if (line 3841) | pub fn requires_if(mut self, val: impl Into<ArgPredicate>, arg_id: imp...
method requires_ifs (line 3920) | pub fn requires_ifs(
method requires_all (line 3934) | pub fn requires_all(self, ids: impl IntoIterator<Item = impl Into<Id>>...
method conflicts_with (line 4007) | pub fn conflicts_with(mut self, arg_id: impl IntoResettable<Id>) -> Se...
method conflicts_with_all (line 4075) | pub fn conflicts_with_all(mut self, names: impl IntoIterator<Item = im...
method overrides_with (line 4120) | pub fn overrides_with(mut self, arg_id: impl IntoResettable<Id>) -> Se...
method overrides_with_all (line 4169) | pub fn overrides_with_all(mut self, names: impl IntoIterator<Item = im...
method get_id (line 4179) | pub fn get_id(&self) -> &Id {
method get_help (line 4185) | pub fn get_help(&self) -> Option<&StyledStr> {
method get_long_help (line 4201) | pub fn get_long_help(&self) -> Option<&StyledStr> {
method get_display_order (line 4207) | pub fn get_display_order(&self) -> usize {
method get_help_heading (line 4213) | pub fn get_help_heading(&self) -> Option<&str> {
method get_short (line 4222) | pub fn get_short(&self) -> Option<char> {
method get_visible_short_aliases (line 4228) | pub fn get_visible_short_aliases(&self) -> Option<Vec<char>> {
method get_all_short_aliases (line 4244) | pub fn get_all_short_aliases(&self) -> Option<Vec<char>> {
method get_short_and_visible_aliases (line 4254) | pub fn get_short_and_visible_aliases(&self) -> Option<Vec<char>> {
method get_long (line 4267) | pub fn get_long(&self) -> Option<&str> {
method get_visible_aliases (line 4273) | pub fn get_visible_aliases(&self) -> Option<Vec<&str>> {
method get_all_aliases (line 4288) | pub fn get_all_aliases(&self) -> Option<Vec<&str>> {
method get_long_and_visible_aliases (line 4298) | pub fn get_long_and_visible_aliases(&self) -> Option<Vec<&str>> {
method get_aliases (line 4311) | pub fn get_aliases(&self) -> Option<Vec<&str>> {
method get_possible_values (line 4326) | pub fn get_possible_values(&self) -> Vec<PossibleValue> {
method get_value_names (line 4339) | pub fn get_value_names(&self) -> Option<&[Str]> {
method get_num_args (line 4349) | pub fn get_num_args(&self) -> Option<ValueRange> {
method get_min_vals (line 4354) | pub(crate) fn get_min_vals(&self) -> usize {
method get_value_delimiter (line 4360) | pub fn get_value_delimiter(&self) -> Option<char> {
method get_value_terminator (line 4367) | pub fn get_value_terminator(&self) -> Option<&Str> {
method get_index (line 4373) | pub fn get_index(&self) -> Option<usize> {
method get_value_hint (line 4378) | pub fn get_value_hint(&self) -> ValueHint {
method get_env (line 4406) | pub fn get_env(&self) -> Option<&std::ffi::OsStr> {
method get_default_values (line 4420) | pub fn get_default_values(&self) -> &[OsStr] {
method is_positional (line 4437) | pub fn is_positional(&self) -> bool {
method is_required_set (line 4442) | pub fn is_required_set(&self) -> bool {
method is_multiple_values_set (line 4446) | pub(crate) fn is_multiple_values_set(&self) -> bool {
method is_takes_value_set (line 4450) | pub(crate) fn is_takes_value_set(&self) -> bool {
method is_allow_hyphen_values_set (line 4457) | pub fn is_allow_hyphen_values_set(&self) -> bool {
method is_allow_negative_numbers_set (line 4462) | pub fn is_allow_negative_numbers_set(&self) -> bool {
method get_action (line 4467) | pub fn get_action(&self) -> &ArgAction {
method get_value_parser (line 4488) | pub fn get_value_parser(&self) -> &super::ValueParser {
method is_global_set (line 4498) | pub fn is_global_set(&self) -> bool {
method is_next_line_help_set (line 4503) | pub fn is_next_line_help_set(&self) -> bool {
method is_hide_set (line 4508) | pub fn is_hide_set(&self) -> bool {
method is_hide_default_value_set (line 4513) | pub fn is_hide_default_value_set(&self) -> bool {
method is_hide_possible_values_set (line 4518) | pub fn is_hide_possible_values_set(&self) -> bool {
method is_hide_env_set (line 4524) | pub fn is_hide_env_set(&self) -> bool {
method is_hide_env_values_set (line 4530) | pub fn is_hide_env_values_set(&self) -> bool {
method is_hide_short_help_set (line 4535) | pub fn is_hide_short_help_set(&self) -> bool {
method is_hide_long_help_set (line 4540) | pub fn is_hide_long_help_set(&self) -> bool {
method is_require_equals_set (line 4545) | pub fn is_require_equals_set(&self) -> bool {
method is_exclusive_set (line 4550) | pub fn is_exclusive_set(&self) -> bool {
method is_trailing_var_arg_set (line 4555) | pub fn is_trailing_var_arg_set(&self) -> bool {
method is_last_set (line 4560) | pub fn is_last_set(&self) -> bool {
method is_ignore_case_set (line 4565) | pub fn is_ignore_case_set(&self) -> bool {
method get (line 4571) | pub fn get<T: ArgExt + Extension>(&self) -> Option<&T> {
method remove (line 4577) | pub fn remove<T: ArgExt + Extension>(mut self) -> Option<T> {
method _build (line 4584) | pub(crate) fn _build(&mut self) {
method name_no_brackets (line 4634) | pub(crate) fn name_no_brackets(&self) -> String {
method stylized (line 4659) | pub(crate) fn stylized(&self, styles: &Styles, required: Option<bool>)...
method stylize_arg_suffix (line 4674) | pub(crate) fn stylize_arg_suffix(&self, styles: &Styles, required: Opt...
method render_arg_val (line 4713) | fn render_arg_val(&self, required: bool) -> String {
method is_multiple (line 4756) | pub(crate) fn is_multiple(&self) -> bool {
method from (line 4762) | fn from(a: &Arg) -> Self {
method fmt (line 4795) | fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), fmt::Error> {
method eq (line 4768) | fn eq(&self, other: &Arg) -> bool {
method partial_cmp (line 4774) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
method cmp (line 4780) | fn cmp(&self, other: &Arg) -> Ordering {
method fmt (line 4788) | fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
type ArgExt (line 4839) | pub trait ArgExt: Extension {}
function flag_display_long (line 4848) | fn flag_display_long() {
function flag_display_short (line 4856) | fn flag_display_short() {
function flag_display_count (line 4864) | fn flag_display_count() {
function flag_display_single_alias (line 4872) | fn flag_display_single_alias() {
function flag_display_multiple_aliases (line 4883) | fn flag_display_multiple_aliases() {
function flag_display_single_short_alias (line 4897) | fn flag_display_single_short_alias() {
function flag_display_multiple_short_aliases (line 4906) | fn flag_display_multiple_short_aliases() {
function option_display_multiple_occurrences (line 4917) | fn option_display_multiple_occurrences() {
function option_display_multiple_values (line 4925) | fn option_display_multiple_values() {
function option_display_zero_or_more_values (line 4936) | fn option_display_zero_or_more_values() {
function option_display_one_or_more_values (line 4947) | fn option_display_one_or_more_values() {
function option_display_zero_or_more_values_with_value_name (line 4958) | fn option_display_zero_or_more_values_with_value_name() {
function option_display_one_or_more_values_with_value_name (line 4970) | fn option_display_one_or_more_values_with_value_name() {
function option_display_optional_value (line 4982) | fn option_display_optional_value() {
function option_display_value_names (line 4993) | fn option_display_value_names() {
function option_display3 (line 5004) | fn option_display3() {
function option_display_single_alias (line 5016) | fn option_display_single_alias() {
function option_display_multiple_aliases (line 5027) | fn option_display_multiple_aliases() {
function option_display_single_short_alias (line 5039) | fn option_display_single_short_alias() {
function option_display_multiple_short_aliases (line 5050) | fn option_display_multiple_short_aliases() {
function positional_display_multiple_values (line 5064) | fn positional_display_multiple_values() {
function positional_display_multiple_values_required (line 5072) | fn positional_display_multiple_values_required() {
function positional_display_zero_or_more_values (line 5080) | fn positional_display_zero_or_more_values() {
function positional_display_one_or_more_values (line 5088) | fn positional_display_one_or_more_values() {
function positional_display_one_or_more_values_required (line 5096) | fn positional_display_one_or_more_values_required() {
function positional_display_optional_value (line 5104) | fn positional_display_optional_value() {
function positional_display_multiple_occurrences (line 5115) | fn positional_display_multiple_occurrences() {
function positional_display_multiple_occurrences_required (line 5123) | fn positional_display_multiple_occurrences_required() {
function positional_display_required (line 5134) | fn positional_display_required() {
function positional_display_val_names (line 5142) | fn positional_display_val_names() {
function positional_display_val_names_required (line 5150) | fn positional_display_val_names_required() {
FILE: clap_builder/src/builder/arg_group.rs
type ArgGroup (line 68) | pub struct ArgGroup {
method new (line 92) | pub fn new(id: impl Into<Id>) -> Self {
method id (line 107) | pub fn id(mut self, id: impl Into<Id>) -> Self {
method arg (line 137) | pub fn arg(mut self, arg_id: impl IntoResettable<Id>) -> Self {
method args (line 170) | pub fn args(mut self, ns: impl IntoIterator<Item = impl Into<Id>>) -> ...
method get_args (line 191) | pub fn get_args(&self) -> impl Iterator<Item = &Id> {
method multiple (line 244) | pub fn multiple(mut self, yes: bool) -> Self {
method is_multiple (line 263) | pub fn is_multiple(&mut self) -> bool {
method required (line 315) | pub fn required(mut self, yes: bool) -> Self {
method requires (line 360) | pub fn requires(mut self, id: impl IntoResettable<Id>) -> Self {
method requires_all (line 412) | pub fn requires_all(mut self, ns: impl IntoIterator<Item = impl Into<I...
method conflicts_with (line 457) | pub fn conflicts_with(mut self, id: impl IntoResettable<Id>) -> Self {
method conflicts_with_all (line 508) | pub fn conflicts_with_all(mut self, ns: impl IntoIterator<Item = impl ...
method get_id (line 520) | pub fn get_id(&self) -> &Id {
method is_required_set (line 526) | pub fn is_required_set(&self) -> bool {
method from (line 532) | fn from(g: &ArgGroup) -> Self {
function groups (line 542) | fn groups() {
function test_from (line 565) | fn test_from() {
function arg_group_send_sync (line 590) | fn arg_group_send_sync() {
function arg_group_expose_is_multiple_helper (line 596) | fn arg_group_expose_is_multiple_helper() {
function arg_group_expose_get_args_helper (line 607) | fn arg_group_expose_get_args_helper() {
FILE: clap_builder/src/builder/arg_predicate.rs
type ArgPredicate (line 8) | pub enum ArgPredicate {
method from (line 16) | fn from(other: S) -> Self {
FILE: clap_builder/src/builder/arg_settings.rs
type ArgFlags (line 5) | pub(crate) struct ArgFlags(u32);
method set (line 8) | pub(crate) fn set(&mut self, setting: ArgSettings) {
method unset (line 12) | pub(crate) fn unset(&mut self, setting: ArgSettings) {
method is_set (line 16) | pub(crate) fn is_set(&self, setting: ArgSettings) -> bool {
method insert (line 20) | pub(crate) fn insert(&mut self, other: Self) {
type Output (line 26) | type Output = Self;
method bitor (line 28) | fn bitor(mut self, rhs: Self) -> Self::Output {
type ArgSettings (line 44) | pub(crate) enum ArgSettings {
method bit (line 67) | fn bit(self) -> u32 {
function setting (line 78) | fn setting() {
function unset_setting (line 84) | fn unset_setting() {
FILE: clap_builder/src/builder/command.rs
type Command (line 74) | pub struct Command {
method new (line 133) | pub fn new(name: impl Into<Str>) -> Self {
method arg (line 171) | pub fn arg(mut self, a: impl Into<Arg>) -> Self {
method arg_internal (line 177) | fn arg_internal(&mut self, mut arg: Arg) {
method args (line 207) | pub fn args(mut self, args: impl IntoIterator<Item = impl Into<Arg>>) ...
method mut_arg (line 244) | pub fn mut_arg<F>(mut self, arg_id: impl AsRef<str>, f: F) -> Self
method mut_args (line 296) | pub fn mut_args<F>(mut self, f: F) -> Self
method mut_group (line 328) | pub fn mut_group<F>(mut self, arg_id: impl AsRef<str>, f: F) -> Self
method mut_subcommand (line 372) | pub fn mut_subcommand<F>(mut self, name: impl AsRef<str>, f: F) -> Self
method mut_subcommands (line 426) | pub fn mut_subcommands<F>(mut self, f: F) -> Self
method group (line 468) | pub fn group(mut self, group: impl Into<ArgGroup>) -> Self {
method groups (line 497) | pub fn groups(mut self, groups: impl IntoIterator<Item = impl Into<Arg...
method subcommand (line 527) | pub fn subcommand(self, subcmd: impl Into<Command>) -> Self {
method subcommand_internal (line 532) | fn subcommand_internal(mut self, mut subcmd: Self) -> Self {
method subcommands (line 558) | pub fn subcommands(mut self, subcmds: impl IntoIterator<Item = impl In...
method defer (line 584) | pub fn defer(mut self, deferred: fn(Command) -> Command) -> Self {
method debug_assert (line 620) | pub fn debug_assert(mut self) {
method error (line 641) | pub fn error(&mut self, kind: ErrorKind, message: impl fmt::Display) -...
method get_matches (line 663) | pub fn get_matches(self) -> ArgMatches {
method get_matches_mut (line 687) | pub fn get_matches_mut(&mut self) -> ArgMatches {
method try_get_matches (line 726) | pub fn try_get_matches(self) -> ClapResult<ArgMatches> {
method get_matches_from (line 758) | pub fn get_matches_from<I, T>(mut self, itr: I) -> ArgMatches
method try_get_matches_from (line 813) | pub fn try_get_matches_from<I, T>(mut self, itr: I) -> ClapResult<ArgM...
method try_get_matches_from_mut (line 861) | pub fn try_get_matches_from_mut<I, T>(&mut self, itr: I) -> ClapResult...
method print_help (line 934) | pub fn print_help(&mut self) -> io::Result<()> {
method print_long_help (line 968) | pub fn print_long_help(&mut self) -> io::Result<()> {
method render_help (line 1004) | pub fn render_help(&mut self) -> StyledStr {
method render_long_help (line 1037) | pub fn render_long_help(&mut self) -> StyledStr {
method write_help (line 1051) | pub fn write_help<W: io::Write>(&mut self, w: &mut W) -> io::Result<()> {
method write_long_help (line 1066) | pub fn write_long_help<W: io::Write>(&mut self, w: &mut W) -> io::Resu...
method render_version (line 1097) | pub fn render_version(&self) -> String {
method render_long_version (line 1122) | pub fn render_long_version(&self) -> String {
method render_usage (line 1143) | pub fn render_usage(&mut self) -> StyledStr {
method render_usage_ (line 1147) | pub(crate) fn render_usage_(&mut self) -> Option<StyledStr> {
method add (line 1158) | pub fn add<T: CommandExt + Extension>(mut self, tagged: T) -> Self {
method no_binary_name (line 1189) | pub fn no_binary_name(self, yes: bool) -> Self {
method ignore_errors (line 1225) | pub fn ignore_errors(self, yes: bool) -> Self {
method args_override_self (line 1249) | pub fn args_override_self(self, yes: bool) -> Self {
method dont_delimit_trailing_values (line 1286) | pub fn dont_delimit_trailing_values(self, yes: bool) -> Self {
method color (line 1323) | pub fn color(self, color: ColorChoice) -> Self {
method styles (line 1366) | pub fn styles(mut self, styles: Styles) -> Self {
method term_width (line 1405) | pub fn term_width(mut self, width: usize) -> Self {
method max_term_width (line 1443) | pub fn max_term_width(mut self, width: usize) -> Self {
method disable_version_flag (line 1493) | pub fn disable_version_flag(self, yes: bool) -> Self {
method propagate_version (line 1527) | pub fn propagate_version(self, yes: bool) -> Self {
method next_line_help (line 1553) | pub fn next_line_help(self, yes: bool) -> Self {
method disable_help_flag (line 1612) | pub fn disable_help_flag(self, yes: bool) -> Self {
method disable_help_subcommand (line 1647) | pub fn disable_help_subcommand(self, yes: bool) -> Self {
method disable_colored_help (line 1673) | pub fn disable_colored_help(self, yes: bool) -> Self {
method help_expected (line 1727) | pub fn help_expected(self, yes: bool) -> Self {
method dont_collapse_args_in_usage (line 1740) | pub fn dont_collapse_args_in_usage(self, _yes: bool) -> Self {
method hide_possible_values (line 1757) | pub fn hide_possible_values(self, yes: bool) -> Self {
method infer_long_args (line 1786) | pub fn infer_long_args(self, yes: bool) -> Self {
method infer_subcommands (line 1840) | pub fn infer_subcommands(self, yes: bool) -> Self {
method name (line 1866) | pub fn name(mut self, name: impl Into<Str>) -> Self {
method bin_name (line 1901) | pub fn bin_name(mut self, name: impl IntoResettable<String>) -> Self {
method display_name (line 1918) | pub fn display_name(mut self, name: impl IntoResettable<String>) -> Se...
method author (line 1950) | pub fn author(mut self, author: impl IntoResettable<Str>) -> Self {
method about (line 1971) | pub fn about(mut self, about: impl IntoResettable<StyledStr>) -> Self {
method long_about (line 2002) | pub fn long_about(mut self, long_about: impl IntoResettable<StyledStr>...
method after_help (line 2025) | pub fn after_help(mut self, help: impl IntoResettable<StyledStr>) -> S...
method after_long_help (line 2049) | pub fn after_long_help(mut self, help: impl IntoResettable<StyledStr>)...
method before_help (line 2070) | pub fn before_help(mut self, help: impl IntoResettable<StyledStr>) -> ...
method before_long_help (line 2092) | pub fn before_long_help(mut self, help: impl IntoResettable<StyledStr>...
method version (line 2119) | pub fn version(mut self, ver: impl IntoResettable<Str>) -> Self {
method long_version (line 2151) | pub fn long_version(mut self, ver: impl IntoResettable<Str>) -> Self {
method override_usage (line 2202) | pub fn override_usage(mut self, usage: impl IntoResettable<StyledStr>)...
method override_help (line 2244) | pub fn override_help(mut self, help: impl IntoResettable<StyledStr>) -...
method help_template (line 2313) | pub fn help_template(mut self, s: impl IntoResettable<StyledStr>) -> S...
method setting (line 2320) | pub(crate) fn setting(mut self, setting: AppSettings) -> Self {
method unset_setting (line 2327) | pub(crate) fn unset_setting(mut self, setting: AppSettings) -> Self {
method global_setting (line 2334) | pub(crate) fn global_setting(mut self, setting: AppSettings) -> Self {
method unset_global_setting (line 2342) | pub(crate) fn unset_global_setting(mut self, setting: AppSettings) -> ...
method flatten_help (line 2355) | pub fn flatten_help(self, yes: bool) -> Self {
method next_help_heading (line 2376) | pub fn next_help_heading(mut self, heading: impl IntoResettable<Str>) ...
method next_display_order (line 2386) | pub fn next_display_order(mut self, disp_ord: impl IntoResettable<usiz...
method arg_required_else_help (line 2411) | pub fn arg_required_else_help(self, yes: bool) -> Self {
method allow_hyphen_values (line 2424) | pub fn allow_hyphen_values(self, yes: bool) -> Self {
method allow_negative_numbers (line 2437) | pub fn allow_negative_numbers(self, yes: bool) -> Self {
method trailing_var_arg (line 2450) | pub fn trailing_var_arg(self, yes: bool) -> Self {
method allow_missing_positional (line 2570) | pub fn allow_missing_positional(self, yes: bool) -> Self {
method short_flag (line 2608) | pub fn short_flag(mut self, short: impl IntoResettable<char>) -> Self {
method long_flag (line 2651) | pub fn long_flag(mut self, long: impl Into<Str>) -> Self {
method alias (line 2691) | pub fn alias(mut self, name: impl IntoResettable<Str>) -> Self {
method short_flag_alias (line 2718) | pub fn short_flag_alias(mut self, name: impl IntoResettable<char>) -> ...
method long_flag_alias (line 2746) | pub fn long_flag_alias(mut self, name: impl IntoResettable<Str>) -> Se...
method aliases (line 2793) | pub fn aliases(mut self, names: impl IntoIterator<Item = impl Into<Str...
method short_flag_aliases (line 2820) | pub fn short_flag_aliases(mut self, names: impl IntoIterator<Item = ch...
method long_flag_aliases (line 2849) | pub fn long_flag_aliases(mut self, names: impl IntoIterator<Item = imp...
method visible_alias (line 2893) | pub fn visible_alias(mut self, name: impl IntoResettable<Str>) -> Self {
method visible_short_flag_alias (line 2923) | pub fn visible_short_flag_alias(mut self, name: impl IntoResettable<ch...
method visible_long_flag_alias (line 2954) | pub fn visible_long_flag_alias(mut self, name: impl IntoResettable<Str...
method visible_aliases (line 3000) | pub fn visible_aliases(mut self, names: impl IntoIterator<Item = impl ...
method visible_short_flag_aliases (line 3023) | pub fn visible_short_flag_aliases(mut self, names: impl IntoIterator<I...
method visible_long_flag_aliases (line 3048) | pub fn visible_long_flag_aliases(
method display_order (line 3105) | pub fn display_order(mut self, ord: impl IntoResettable<usize>) -> Self {
method hide (line 3126) | pub fn hide(self, yes: bool) -> Self {
method subcommand_required (line 3153) | pub fn subcommand_required(self, yes: bool) -> Self {
method allow_external_subcommands (line 3209) | pub fn allow_external_subcommands(self, yes: bool) -> Self {
method external_subcommand_value_parser (line 3280) | pub fn external_subcommand_value_parser(
method args_conflicts_with_subcommands (line 3311) | pub fn args_conflicts_with_subcommands(self, yes: bool) -> Self {
method subcommand_precedence_over_arg (line 3371) | pub fn subcommand_precedence_over_arg(self, yes: bool) -> Self {
method subcommand_negates_reqs (line 3430) | pub fn subcommand_negates_reqs(self, yes: bool) -> Self {
method multicall (line 3568) | pub fn multicall(self, yes: bool) -> Self {
method subcommand_value_name (line 3637) | pub fn subcommand_value_name(mut self, value_name: impl IntoResettable...
method subcommand_help_heading (line 3703) | pub fn subcommand_help_heading(mut self, heading: impl IntoResettable<...
method get_usage_name (line 3713) | pub(crate) fn get_usage_name(&self) -> Option<&str> {
method get_usage_name_fallback (line 3719) | pub(crate) fn get_usage_name_fallback(&self) -> &str {
method get_usage_name_fallback (line 3727) | pub(crate) fn get_usage_name_fallback(&self) -> &str {
method get_display_name (line 3733) | pub fn get_display_name(&self) -> Option<&str> {
method get_bin_name (line 3739) | pub fn get_bin_name(&self) -> Option<&str> {
method get_bin_name_fallback (line 3745) | pub(crate) fn get_bin_name_fallback(&self) -> &str {
method set_bin_name (line 3750) | pub fn set_bin_name(&mut self, name: impl Into<String>) {
method get_name (line 3756) | pub fn get_name(&self) -> &str {
method get_name_str (line 3762) | pub(crate) fn get_name_str(&self) -> &Str {
method get_name_and_visible_aliases (line 3767) | pub fn get_name_and_visible_aliases(&self) -> Vec<&str> {
method get_version (line 3775) | pub fn get_version(&self) -> Option<&str> {
method get_long_version (line 3781) | pub fn get_long_version(&self) -> Option<&str> {
method get_display_order (line 3787) | pub fn get_display_order(&self) -> usize {
method get_author (line 3793) | pub fn get_author(&self) -> Option<&str> {
method get_short_flag (line 3799) | pub fn get_short_flag(&self) -> Option<char> {
method get_long_flag (line 3805) | pub fn get_long_flag(&self) -> Option<&str> {
method get_about (line 3813) | pub fn get_about(&self) -> Option<&StyledStr> {
method get_long_about (line 3821) | pub fn get_long_about(&self) -> Option<&StyledStr> {
method is_flatten_help_set (line 3827) | pub fn is_flatten_help_set(&self) -> bool {
method get_next_help_heading (line 3833) | pub fn get_next_help_heading(&self) -> Option<&str> {
method get_visible_aliases (line 3839) | pub fn get_visible_aliases(&self) -> impl Iterator<Item = &str> + '_ {
method get_visible_short_flag_aliases (line 3848) | pub fn get_visible_short_flag_aliases(&self) -> impl Iterator<Item = c...
method get_visible_long_flag_aliases (line 3857) | pub fn get_visible_long_flag_aliases(&self) -> impl Iterator<Item = &s...
method get_all_aliases (line 3866) | pub fn get_all_aliases(&self) -> impl Iterator<Item = &str> + '_ {
method get_all_short_flag_aliases (line 3872) | pub fn get_all_short_flag_aliases(&self) -> impl Iterator<Item = char>...
method get_all_long_flag_aliases (line 3878) | pub fn get_all_long_flag_aliases(&self) -> impl Iterator<Item = &str> ...
method get_aliases (line 3884) | pub fn get_aliases(&self) -> impl Iterator<Item = &str> + '_ {
method is_set (line 3892) | pub(crate) fn is_set(&self, s: AppSettings) -> bool {
method get_color (line 3897) | pub fn get_color(&self) -> ColorChoice {
method get_styles (line 3918) | pub fn get_styles(&self) -> &Styles {
method get_subcommands (line 3924) | pub fn get_subcommands(&self) -> impl Iterator<Item = &Command> {
method get_subcommands_mut (line 3930) | pub fn get_subcommands_mut(&mut self) -> impl Iterator<Item = &mut Com...
method has_subcommands (line 3936) | pub fn has_subcommands(&self) -> bool {
method get_subcommand_help_heading (line 3942) | pub fn get_subcommand_help_heading(&self) -> Option<&str> {
method get_subcommand_value_name (line 3948) | pub fn get_subcommand_value_name(&self) -> Option<&str> {
method get_before_help (line 3954) | pub fn get_before_help(&self) -> Option<&StyledStr> {
method get_before_long_help (line 3960) | pub fn get_before_long_help(&self) -> Option<&StyledStr> {
method get_after_help (line 3966) | pub fn get_after_help(&self) -> Option<&StyledStr> {
method get_after_long_help (line 3972) | pub fn get_after_long_help(&self) -> Option<&StyledStr> {
method find_subcommand (line 3980) | pub fn find_subcommand(&self, name: impl AsRef<std::ffi::OsStr>) -> Op...
method find_subcommand_mut (line 3990) | pub fn find_subcommand_mut(
method get_groups (line 4000) | pub fn get_groups(&self) -> impl Iterator<Item = &ArgGroup> {
method get_arguments (line 4006) | pub fn get_arguments(&self) -> impl Iterator<Item = &Arg> {
method get_positionals (line 4012) | pub fn get_positionals(&self) -> impl Iterator<Item = &Arg> {
method get_opts (line 4017) | pub fn get_opts(&self) -> impl Iterator<Item = &Arg> {
method get_arg_conflicts_with (line 4031) | pub fn get_arg_conflicts_with(&self, arg: &Arg) -> Vec<&Arg> // FIXME:...
method get_global_arg_conflicts_with (line 4065) | fn get_global_arg_conflicts_with(&self, arg: &Arg) -> Vec<&Arg> // FIX...
method get_subcommands_containing (line 4104) | fn get_subcommands_containing(&self, arg: &Arg) -> Vec<&Self> {
method is_no_binary_name_set (line 4120) | pub fn is_no_binary_name_set(&self) -> bool {
method is_ignore_errors_set (line 4125) | pub(crate) fn is_ignore_errors_set(&self) -> bool {
method is_dont_delimit_trailing_values_set (line 4130) | pub fn is_dont_delimit_trailing_values_set(&self) -> bool {
method is_disable_version_flag_set (line 4135) | pub fn is_disable_version_flag_set(&self) -> bool {
method is_propagate_version_set (line 4141) | pub fn is_propagate_version_set(&self) -> bool {
method is_next_line_help_set (line 4146) | pub fn is_next_line_help_set(&self) -> bool {
method is_disable_help_flag_set (line 4151) | pub fn is_disable_help_flag_set(&self) -> bool {
method is_disable_help_subcommand_set (line 4156) | pub fn is_disable_help_subcommand_set(&self) -> bool {
method is_disable_colored_help_set (line 4161) | pub fn is_disable_colored_help_set(&self) -> bool {
method is_help_expected_set (line 4167) | pub(crate) fn is_help_expected_set(&self) -> bool {
method is_dont_collapse_args_in_usage_set (line 4176) | pub fn is_dont_collapse_args_in_usage_set(&self) -> bool {
method is_infer_long_args_set (line 4181) | pub(crate) fn is_infer_long_args_set(&self) -> bool {
method is_infer_subcommands_set (line 4186) | pub(crate) fn is_infer_subcommands_set(&self) -> bool {
method is_arg_required_else_help_set (line 4191) | pub fn is_arg_required_else_help_set(&self) -> bool {
method is_allow_hyphen_values_set (line 4203) | pub(crate) fn is_allow_hyphen_values_set(&self) -> bool {
method is_allow_negative_numbers_set (line 4215) | pub fn is_allow_negative_numbers_set(&self) -> bool {
method is_trailing_var_arg_set (line 4224) | pub fn is_trailing_var_arg_set(&self) -> bool {
method is_allow_missing_positional_set (line 4229) | pub fn is_allow_missing_positional_set(&self) -> bool {
method is_hide_set (line 4234) | pub fn is_hide_set(&self) -> bool {
method is_subcommand_required_set (line 4239) | pub fn is_subcommand_required_set(&self) -> bool {
method is_allow_external_subcommands_set (line 4244) | pub fn is_allow_external_subcommands_set(&self) -> bool {
method get_external_subcommand_value_parser (line 4259) | pub fn get_external_subcommand_value_parser(&self) -> Option<&super::V...
method is_args_conflicts_with_subcommands_set (line 4269) | pub fn is_args_conflicts_with_subcommands_set(&self) -> bool {
method is_args_override_self (line 4274) | pub fn is_args_override_self(&self) -> bool {
method is_subcommand_precedence_over_arg_set (line 4279) | pub fn is_subcommand_precedence_over_arg_set(&self) -> bool {
method is_subcommand_negates_reqs_set (line 4284) | pub fn is_subcommand_negates_reqs_set(&self) -> bool {
method is_multicall_set (line 4289) | pub fn is_multicall_set(&self) -> bool {
method get (line 4295) | pub fn get<T: CommandExt + Extension>(&self) -> Option<&T> {
method remove (line 4301) | pub fn remove<T: CommandExt + Extension>(mut self) -> Option<T> {
method get_override_usage (line 4308) | pub(crate) fn get_override_usage(&self) -> Option<&StyledStr> {
method get_override_help (line 4312) | pub(crate) fn get_override_help(&self) -> Option<&StyledStr> {
method get_help_template (line 4317) | pub(crate) fn get_help_template(&self) -> Option<&StyledStr> {
method get_term_width (line 4322) | pub(crate) fn get_term_width(&self) -> Option<usize> {
method get_max_term_width (line 4327) | pub(crate) fn get_max_term_width(&self) -> Option<usize> {
method get_keymap (line 4331) | pub(crate) fn get_keymap(&self) -> &MKeyMap {
method get_used_global_args (line 4335) | fn get_used_global_args(&self, matches: &ArgMatches, global_arg_vec: &...
method _do_parse (line 4349) | fn _do_parse(
method build (line 4384) | pub fn build(&mut self) {
method _build_recursive (line 4389) | pub(crate) fn _build_recursive(&mut self, expand_help_tree: bool) {
method _build_self (line 4396) | pub(crate) fn _build_self(&mut self, expand_help_tree: bool) {
method _build_subcommand (line 4494) | pub(crate) fn _build_subcommand(&mut self, name: &str) -> Option<&mut ...
method _build_bin_names_internal (line 4579) | fn _build_bin_names_internal(&mut self) {
method _panic_on_missing_help (line 4694) | pub(crate) fn _panic_on_missing_help(&self, help_required_globally: bo...
method two_args_of (line 4720) | pub(crate) fn two_args_of<F>(&self, condition: F) -> Option<(&Arg, &Arg)>
method two_groups_of (line 4731) | fn two_groups_of<F>(&self, condition: F) -> Option<(&ArgGroup, &ArgGro...
method _propagate_global_args (line 4739) | pub(crate) fn _propagate_global_args(&mut self) {
method _propagate (line 4774) | pub(crate) fn _propagate(&mut self) {
method _propagate_subcommand (line 4783) | fn _propagate_subcommand(&self, sc: &mut Self) {
method _check_help_and_version (line 4802) | pub(crate) fn _check_help_and_version(&mut self, expand_help_tree: boo...
method _copy_subtree_for_help (line 4882) | fn _copy_subtree_for_help(&self) -> Command {
method _render_version (line 4894) | pub(crate) fn _render_version(&self, use_long: bool) -> String {
method format_group (line 4912) | pub(crate) fn format_group(&self, g: &Id) -> StyledStr {
method get_non_positionals (line 4946) | pub(crate) fn get_non_positionals(&self) -> impl Iterator<Item = &Arg> {
method find (line 4950) | pub(crate) fn find(&self, arg_id: &Id) -> Option<&Arg> {
method contains_short (line 4955) | pub(crate) fn contains_short(&self, s: char) -> bool {
method set (line 4965) | pub(crate) fn set(&mut self, s: AppSettings) {
method has_positionals (line 4970) | pub(crate) fn has_positionals(&self) -> bool {
method has_visible_subcommands (line 4975) | pub(crate) fn has_visible_subcommands(&self) -> bool {
method aliases_to (line 4984) | pub(crate) fn aliases_to(&self, name: impl AsRef<std::ffi::OsStr>) -> ...
method short_flag_aliases_to (line 4992) | pub(crate) fn short_flag_aliases_to(&self, flag: char) -> bool {
method long_flag_aliases_to (line 5000) | pub(crate) fn long_flag_aliases_to(&self, flag: &str) -> bool {
method id_exists (line 5011) | pub(crate) fn id_exists(&self, id: &Id) -> bool {
method groups_for_arg (line 5016) | pub(crate) fn groups_for_arg<'a>(&'a self, arg: &Id) -> impl Iterator<...
method find_group (line 5025) | pub(crate) fn find_group(&self, group_id: &Id) -> Option<&ArgGroup> {
method all_subcommand_names (line 5031) | pub(crate) fn all_subcommand_names(&self) -> impl Iterator<Item = &str...
method required_graph (line 5039) | pub(crate) fn required_graph(&self) -> ChildGraph<Id> {
method unroll_args_in_group (line 5056) | pub(crate) fn unroll_args_in_group(&self, group: &Id) -> Vec<Id> {
method unroll_arg_requires (line 5086) | pub(crate) fn unroll_arg_requires<F>(&self, func: F, arg: &Id) -> Vec<Id>
method find_short_subcmd (line 5117) | pub(crate) fn find_short_subcmd(&self, c: char) -> Option<&str> {
method find_long_subcmd (line 5124) | pub(crate) fn find_long_subcmd(&self, long: &str) -> Option<&str> {
method write_help_err (line 5130) | pub(crate) fn write_help_err(&self, mut use_long: bool) -> StyledStr {
method write_version_err (line 5146) | pub(crate) fn write_version_err(&self, use_long: bool) -> StyledStr {
method long_help_exists (line 5151) | pub(crate) fn long_help_exists(&self) -> bool {
method long_help_exists_ (line 5156) | fn long_help_exists_(&self) -> bool {
method color_help (line 5182) | pub(crate) fn color_help(&self) -> ColorChoice {
type Output (line 5238) | type Output = Arg;
method index (line 5240) | fn index(&self, key: &Id) -> &Self::Output {
method from (line 5246) | fn from(cmd: &'_ Command) -> Self {
method fmt (line 5252) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Captures (line 4939) | pub(crate) trait Captures<'a> {}
method default (line 5193) | fn default() -> Self {
type CommandExt (line 5259) | pub trait CommandExt: Extension {}
type AppExt (line 5262) | pub(crate) trait AppExt: Extension {}
type TermWidth (line 5266) | struct TermWidth(usize);
type MaxTermWidth (line 5272) | struct MaxTermWidth(usize);
function two_elements_of (line 5279) | fn two_elements_of<I, T>(mut iter: I) -> Option<(T, T)>
function check_auto_traits (line 5293) | fn check_auto_traits() {
FILE: clap_builder/src/builder/debug_asserts.rs
function assert_app (line 11) | pub(crate) fn assert_app(cmd: &Command) {
function duplicate_tip (line 399) | fn duplicate_tip(cmd: &Command, first: &Arg, second: &Arg) -> &'static s...
type Flag (line 414) | enum Flag<'a> {
method eq (line 420) | fn eq(&self, other: &Flag<'_>) -> bool {
method partial_cmp (line 426) | fn partial_cmp(&self, other: &Flag<'_>) -> Option<Ordering> {
method cmp (line 432) | fn cmp(&self, other: &Self) -> Ordering {
function detect_duplicate_flags (line 448) | fn detect_duplicate_flags(flags: &[Flag<'_>], short_or_long: &str) {
function find_duplicates (line 474) | fn find_duplicates<T: PartialEq>(slice: &[T]) -> impl Iterator<Item = (&...
function assert_app_flags (line 484) | fn assert_app_flags(cmd: &Command) {
function _verify_positionals (line 508) | fn _verify_positionals(cmd: &Command) -> bool {
function assert_arg (line 694) | fn assert_arg(arg: &Arg) {
function assert_arg_flags (line 804) | fn assert_arg_flags(arg: &Arg) {
FILE: clap_builder/src/builder/ext.rs
type Extensions (line 6) | pub(crate) struct Extensions {
method get (line 12) | pub(crate) fn get<T: Extension>(&self) -> Option<&T> {
method set (line 21) | pub(crate) fn set<T: Extension>(&mut self, tagged: T) -> bool {
method remove (line 28) | pub(crate) fn remove<T: Extension>(&mut self) -> Option<T> {
method update (line 36) | pub(crate) fn update(&mut self, other: &Self) {
type Extension (line 44) | pub trait Extension: std::fmt::Debug + Clone + std::any::Any + Send + Sy...
FILE: clap_builder/src/builder/os_str.rs
type OsStr (line 14) | pub struct OsStr {
method from_string (line 20) | pub(crate) fn from_string(name: std::ffi::OsString) -> Self {
method from_ref (line 27) | pub(crate) fn from_ref(name: &std::ffi::OsStr) -> Self {
method from_static_ref (line 33) | pub(crate) fn from_static_ref(name: &'static std::ffi::OsStr) -> Self {
method as_os_str (line 40) | pub fn as_os_str(&self) -> &std::ffi::OsStr {
method to_os_string (line 45) | pub fn to_os_string(&self) -> std::ffi::OsString {
method from (line 51) | fn from(id: &'_ OsStr) -> Self {
method from (line 58) | fn from(id: Str) -> Self {
method from (line 68) | fn from(id: Str) -> Self {
method from (line 74) | fn from(id: &'_ Str) -> Self {
method from (line 81) | fn from(name: std::ffi::OsString) -> Self {
method from (line 88) | fn from(name: &'_ std::ffi::OsString) -> Self {
method from (line 95) | fn from(name: String) -> Self {
method from (line 102) | fn from(name: &'_ String) -> Self {
method from (line 108) | fn from(name: &'static std::ffi::OsStr) -> Self {
method from (line 114) | fn from(name: &'_ &'static std::ffi::OsStr) -> Self {
method from (line 120) | fn from(name: &'static str) -> Self {
method from (line 126) | fn from(name: &'_ &'static str) -> Self {
method from (line 133) | fn from(cow: Cow<'static, str>) -> Self {
method fmt (line 155) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Target (line 161) | type Target = std::ffi::OsStr;
method deref (line 164) | fn deref(&self) -> &std::ffi::OsStr {
method as_ref (line 171) | fn as_ref(&self) -> &std::ffi::OsStr {
method as_ref (line 178) | fn as_ref(&self) -> &std::path::Path {
method borrow (line 185) | fn borrow(&self) -> &std::ffi::OsStr {
method eq (line 192) | fn eq(&self, other: &str) -> bool {
method eq (line 205) | fn eq(&self, other: &&str) -> bool {
method eq (line 218) | fn eq(&self, other: &&std::ffi::OsStr) -> bool {
method eq (line 231) | fn eq(&self, other: &String) -> bool {
method eq (line 244) | fn eq(&self, other: &std::ffi::OsString) -> bool {
function from (line 142) | fn from(name: OsStr) -> Self {
function from (line 148) | fn from(name: OsStr) -> Self {
function eq (line 198) | fn eq(&self, other: &OsStr) -> bool {
function eq (line 211) | fn eq(&self, other: &OsStr) -> bool {
function eq (line 224) | fn eq(&self, other: &OsStr) -> bool {
method eq (line 237) | fn eq(&self, other: &OsStr) -> bool {
function eq (line 250) | fn eq(&self, other: &OsStr) -> bool {
type Inner (line 258) | pub(crate) enum Inner {
method from_string (line 264) | pub(crate) fn from_string(name: std::ffi::OsString) -> Self {
method from_ref (line 268) | pub(crate) fn from_ref(name: &std::ffi::OsStr) -> Self {
method from_static_ref (line 272) | pub(crate) fn from_static_ref(name: &'static std::ffi::OsStr) -> Self {
method as_os_str (line 276) | pub(crate) fn as_os_str(&self) -> &std::ffi::OsStr {
method into_os_string (line 283) | pub(crate) fn into_os_string(self) -> std::ffi::OsString {
method from_static_ref (line 295) | pub(crate) fn from_static_ref(name: &'static std::ffi::OsStr) -> Self {
method as_os_str (line 299) | pub(crate) fn as_os_str(&self) -> &std::ffi::OsStr {
method into_os_string (line 303) | pub(crate) fn into_os_string(self) -> std::ffi::OsString {
method hash (line 339) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
type Inner (line 292) | pub(crate) struct Inner(&'static std::ffi::OsStr);
method from_string (line 264) | pub(crate) fn from_string(name: std::ffi::OsString) -> Self {
method from_ref (line 268) | pub(crate) fn from_ref(name: &std::ffi::OsStr) -> Self {
method from_static_ref (line 272) | pub(crate) fn from_static_ref(name: &'static std::ffi::OsStr) -> Self {
method as_os_str (line 276) | pub(crate) fn as_os_str(&self) -> &std::ffi::OsStr {
method into_os_string (line 283) | pub(crate) fn into_os_string(self) -> std::ffi::OsString {
method from_static_ref (line 295) | pub(crate) fn from_static_ref(name: &'static std::ffi::OsStr) -> Self {
method as_os_str (line 299) | pub(crate) fn as_os_str(&self) -> &std::ffi::OsStr {
method into_os_string (line 303) | pub(crate) fn into_os_string(self) -> std::ffi::OsString {
method hash (line 339) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
method default (line 312) | fn default() -> Self {
method eq (line 318) | fn eq(&self, other: &Inner) -> bool {
method partial_cmp (line 324) | fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
method cmp (line 330) | fn cmp(&self, other: &Inner) -> std::cmp::Ordering {
function from_cow_borrowed (line 351) | fn from_cow_borrowed() {
function from_cow_owned (line 359) | fn from_cow_owned() {
FILE: clap_builder/src/builder/possible_value.rs
type PossibleValue (line 42) | pub struct PossibleValue {
method new (line 72) | pub fn new(name: impl Into<Str>) -> Self {
method help (line 95) | pub fn help(mut self, help: impl IntoResettable<StyledStr>) -> Self {
method hide (line 117) | pub fn hide(mut self, yes: bool) -> Self {
method alias (line 134) | pub fn alias(mut self, name: impl IntoResettable<Str>) -> Self {
method aliases (line 155) | pub fn aliases(mut self, names: impl IntoIterator<Item = impl Into<Str...
method get_name (line 165) | pub fn get_name(&self) -> &str {
method get_help (line 171) | pub fn get_help(&self) -> Option<&StyledStr> {
method is_hide_set (line 177) | pub fn is_hide_set(&self) -> bool {
method should_show_help (line 182) | pub(crate) fn should_show_help(&self) -> bool {
method get_visible_quoted_name (line 189) | pub(crate) fn get_visible_quoted_name(&self) -> Option<std::borrow::Co...
method get_name_and_aliases (line 200) | pub fn get_name_and_aliases(&self) -> impl Iterator<Item = &str> + '_ {
method matches (line 221) | pub fn matches(&self, value: &str, ignore_case: bool) -> bool {
method from (line 232) | fn from(s: S) -> Self {
FILE: clap_builder/src/builder/range.rs
type ValueRange (line 3) | pub struct ValueRange {
constant EMPTY (line 10) | pub const EMPTY: Self = Self {
constant SINGLE (line 16) | pub const SINGLE: Self = Self {
constant OPTIONAL (line 22) | pub(crate) const OPTIONAL: Self = Self {
constant FULL (line 27) | pub(crate) const FULL: Self = Self {
method new (line 57) | pub fn new(range: impl Into<Self>) -> Self {
method raw (line 61) | pub(crate) fn raw(start_inclusive: usize, end_inclusive: usize) -> Self {
method min_values (line 70) | pub fn min_values(&self) -> usize {
method max_values (line 75) | pub fn max_values(&self) -> usize {
method takes_values (line 92) | pub fn takes_values(&self) -> bool {
method is_unbounded (line 96) | pub(crate) fn is_unbounded(&self) -> bool {
method is_fixed (line 100) | pub(crate) fn is_fixed(&self) -> bool {
method is_multiple (line 104) | pub(crate) fn is_multiple(&self) -> bool {
method num_values (line 108) | pub(crate) fn num_values(&self) -> Option<usize> {
method accepts_more (line 112) | pub(crate) fn accepts_more(&self, current: usize) -> bool {
method start_bound (line 118) | fn start_bound(&self) -> std::ops::Bound<&usize> {
method end_bound (line 122) | fn end_bound(&self) -> std::ops::Bound<&usize> {
method from (line 134) | fn from(fixed: usize) -> Self {
method from (line 140) | fn from(range: std::ops::Range<usize>) -> Self {
method from (line 148) | fn from(_: std::ops::RangeFull) -> Self {
method from (line 154) | fn from(range: std::ops::RangeFrom<usize>) -> Self {
method from (line 162) | fn from(range: std::ops::RangeTo<usize>) -> Self {
method from (line 170) | fn from(range: std::ops::RangeInclusive<usize>) -> Self {
method from (line 178) | fn from(range: std::ops::RangeToInclusive<usize>) -> Self {
method fmt (line 186) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method fmt (line 200) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method default (line 128) | fn default() -> Self {
function from_fixed (line 212) | fn from_fixed() {
function from_fixed_empty (line 223) | fn from_fixed_empty() {
function from_range (line 234) | fn from_range() {
function from_range_inclusive (line 245) | fn from_range_inclusive() {
function from_range_full (line 256) | fn from_range_full() {
function from_range_from (line 267) | fn from_range_from() {
function from_range_to (line 278) | fn from_range_to() {
function from_range_to_inclusive (line 289) | fn from_range_to_inclusive() {
FILE: clap_builder/src/builder/resettable.rs
type Resettable (line 33) | pub enum Resettable<T> {
function into_option (line 41) | pub(crate) fn into_option(self) -> Option<T> {
function from (line 50) | fn from(other: T) -> Self {
function from (line 56) | fn from(other: Option<T>) -> Self {
type IntoResettable (line 65) | pub trait IntoResettable<T> {
method into_resettable (line 67) | fn into_resettable(self) -> Resettable<T>;
function into_resettable (line 71) | fn into_resettable(self) -> Resettable<char> {
function into_resettable (line 80) | fn into_resettable(self) -> Resettable<usize> {
function into_resettable (line 89) | fn into_resettable(self) -> Resettable<ArgAction> {
function into_resettable (line 98) | fn into_resettable(self) -> Resettable<ValueHint> {
function into_resettable (line 107) | fn into_resettable(self) -> Resettable<ValueParser> {
function into_resettable (line 116) | fn into_resettable(self) -> Resettable<StyledStr> {
function into_resettable (line 125) | fn into_resettable(self) -> Resettable<OsStr> {
function into_resettable (line 134) | fn into_resettable(self) -> Resettable<Str> {
function into_resettable (line 143) | fn into_resettable(self) -> Resettable<T> {
function into_resettable (line 149) | fn into_resettable(self) -> Resettable<char> {
function into_resettable (line 155) | fn into_resettable(self) -> Resettable<usize> {
method into_resettable (line 161) | fn into_resettable(self) -> Resettable<ArgAction> {
method into_resettable (line 167) | fn into_resettable(self) -> Resettable<ValueHint> {
method into_resettable (line 173) | fn into_resettable(self) -> Resettable<ValueRange> {
method into_resettable (line 179) | fn into_resettable(self) -> Resettable<ValueParser> {
method into_resettable (line 185) | fn into_resettable(self) -> Resettable<String> {
method into_resettable (line 191) | fn into_resettable(self) -> Resettable<StyledStr> {
method into_resettable (line 197) | fn into_resettable(self) -> Resettable<OsStr> {
method into_resettable (line 203) | fn into_resettable(self) -> Resettable<Str> {
method into_resettable (line 209) | fn into_resettable(self) -> Resettable<crate::Id> {
FILE: clap_builder/src/builder/str.rs
type Str (line 13) | pub struct Str {
method from_string (line 19) | pub(crate) fn from_string(name: String) -> Self {
method from_ref (line 26) | pub(crate) fn from_ref(name: &str) -> Self {
method from_static_ref (line 32) | pub(crate) fn from_static_ref(name: &'static str) -> Self {
method into_inner (line 38) | pub(crate) fn into_inner(self) -> Inner {
method as_str (line 43) | pub fn as_str(&self) -> &str {
method from (line 49) | fn from(id: &'_ Str) -> Self {
method from (line 56) | fn from(name: String) -> Self {
method from (line 63) | fn from(name: &'_ String) -> Self {
method from (line 69) | fn from(name: &'static str) -> Self {
method from (line 75) | fn from(name: &'_ &'static str) -> Self {
method from (line 82) | fn from(cow: Cow<'static, str>) -> Self {
method fmt (line 116) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method fmt (line 123) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Target (line 129) | type Target = str;
method deref (line 132) | fn deref(&self) -> &str {
method as_ref (line 139) | fn as_ref(&self) -> &str {
method as_ref (line 146) | fn as_ref(&self) -> &[u8] {
method as_ref (line 153) | fn as_ref(&self) -> &std::ffi::OsStr {
method as_ref (line 160) | fn as_ref(&self) -> &std::path::Path {
method borrow (line 167) | fn borrow(&self) -> &str {
method eq (line 174) | fn eq(&self, other: &str) -> bool {
method eq (line 187) | fn eq(&self, other: &&str) -> bool {
method eq (line 200) | fn eq(&self, other: &std::ffi::OsStr) -> bool {
method eq (line 213) | fn eq(&self, other: &&std::ffi::OsStr) -> bool {
method eq (line 226) | fn eq(&self, other: &String) -> bool {
method from (line 91) | fn from(name: Str) -> Self {
function from (line 97) | fn from(name: Str) -> Self {
function from (line 103) | fn from(name: Str) -> Self {
function from (line 109) | fn from(name: Str) -> Self {
function eq (line 180) | fn eq(&self, other: &Str) -> bool {
function eq (line 193) | fn eq(&self, other: &Str) -> bool {
function eq (line 206) | fn eq(&self, other: &Str) -> bool {
function eq (line 219) | fn eq(&self, other: &Str) -> bool {
method eq (line 232) | fn eq(&self, other: &Str) -> bool {
type Inner (line 240) | pub(crate) enum Inner {
method from_string (line 246) | pub(crate) fn from_string(name: String) -> Self {
method from_ref (line 250) | pub(crate) fn from_ref(name: &str) -> Self {
method from_static_ref (line 254) | pub(crate) fn from_static_ref(name: &'static str) -> Self {
method as_str (line 258) | pub(crate) fn as_str(&self) -> &str {
method into_string (line 265) | pub(crate) fn into_string(self) -> String {
method from_static_ref (line 280) | pub(crate) fn from_static_ref(name: &'static str) -> Self {
method as_str (line 284) | pub(crate) fn as_str(&self) -> &str {
method into_string (line 288) | pub(crate) fn into_string(self) -> String {
method hash (line 324) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
type Inner (line 277) | pub(crate) struct Inner(pub(crate) &'static str);
method from_string (line 246) | pub(crate) fn from_string(name: String) -> Self {
method from_ref (line 250) | pub(crate) fn from_ref(name: &str) -> Self {
method from_static_ref (line 254) | pub(crate) fn from_static_ref(name: &'static str) -> Self {
method as_str (line 258) | pub(crate) fn as_str(&self) -> &str {
method into_string (line 265) | pub(crate) fn into_string(self) -> String {
method from_static_ref (line 280) | pub(crate) fn from_static_ref(name: &'static str) -> Self {
method as_str (line 284) | pub(crate) fn as_str(&self) -> &str {
method into_string (line 288) | pub(crate) fn into_string(self) -> String {
method hash (line 324) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
method default (line 297) | fn default() -> Self {
method eq (line 303) | fn eq(&self, other: &Inner) -> bool {
method partial_cmp (line 309) | fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
method cmp (line 315) | fn cmp(&self, other: &Inner) -> std::cmp::Ordering {
function from_cow_borrowed (line 336) | fn from_cow_borrowed() {
function from_cow_owned (line 344) | fn from_cow_owned() {
FILE: clap_builder/src/builder/styled_str.rs
type StyledStr (line 25) | pub struct StyledStr(String);
method new (line 29) | pub const fn new() -> Self {
method ansi (line 35) | pub fn ansi(&self) -> impl std::fmt::Display + '_ {
method push_string (line 41) | pub(crate) fn push_string(&mut self, msg: String) {
method push_str (line 46) | pub fn push_str(&mut self, msg: &str) {
method trim_start_lines (line 50) | pub(crate) fn trim_start_lines(&mut self) {
method trim_end (line 59) | pub(crate) fn trim_end(&mut self) {
method replace_newline_var (line 64) | pub(crate) fn replace_newline_var(&mut self) {
method indent (line 69) | pub(crate) fn indent(&mut self, initial: &str, trailing: &str) {
method wrap (line 78) | pub(crate) fn wrap(&mut self, _hard_width: usize) {}
method wrap (line 81) | pub(crate) fn wrap(&mut self, hard_width: usize) {
method display_width (line 115) | pub(crate) fn display_width(&self) -> usize {
method is_empty (line 124) | pub(crate) fn is_empty(&self) -> bool {
method as_styled_str (line 129) | pub(crate) fn as_styled_str(&self) -> &str {
method iter_text (line 134) | pub(crate) fn iter_text(&self) -> impl Iterator<Item = &str> {
method iter_text (line 139) | pub(crate) fn iter_text(&self) -> impl Iterator<Item = &str> {
method push_styled (line 143) | pub(crate) fn push_styled(&mut self, other: &Self) {
method write_to (line 147) | pub(crate) fn write_to(&self, buffer: &mut dyn std::io::Write) -> std:...
method from (line 162) | fn from(name: String) -> Self {
method from (line 168) | fn from(name: &'_ String) -> Self {
method from (line 176) | fn from(name: &'static str) -> Self {
method from (line 184) | fn from(name: &'_ &'static str) -> Self {
method from (line 190) | fn from(cow: Cow<'static, str>) -> Self {
method write_str (line 200) | fn write_str(&mut self, s: &str) -> Result<(), std::fmt::Error> {
method write_char (line 206) | fn write_char(&mut self, c: char) -> Result<(), std::fmt::Error> {
method fmt (line 214) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method default (line 155) | fn default() -> Self {
function wrap_unstyled (line 233) | fn wrap_unstyled() {
function wrap_styled (line 252) | fn wrap_styled() {
function from_cow_borrowed (line 275) | fn from_cow_borrowed() {
function from_cow_owned (line 282) | fn from_cow_owned() {
FILE: clap_builder/src/builder/styling.rs
type Styles (line 23) | pub struct Styles {
method plain (line 37) | pub const fn plain() -> Self {
method styled (line 52) | pub const fn styled() -> Self {
method header (line 77) | pub const fn header(mut self, style: Style) -> Self {
method error (line 84) | pub const fn error(mut self, style: Style) -> Self {
method usage (line 91) | pub const fn usage(mut self, style: Style) -> Self {
method literal (line 98) | pub const fn literal(mut self, style: Style) -> Self {
method placeholder (line 105) | pub const fn placeholder(mut self, style: Style) -> Self {
method valid (line 112) | pub const fn valid(mut self, style: Style) -> Self {
method invalid (line 119) | pub const fn invalid(mut self, style: Style) -> Self {
method context (line 128) | pub const fn context(mut self, style: Style) -> Self {
method context_value (line 137) | pub const fn context_value(mut self, style: Style) -> Self {
method get_header (line 147) | pub const fn get_header(&self) -> &Style {
method get_error (line 153) | pub const fn get_error(&self) -> &Style {
method get_usage (line 159) | pub const fn get_usage(&self) -> &Style {
method get_literal (line 165) | pub const fn get_literal(&self) -> &Style {
method get_placeholder (line 171) | pub const fn get_placeholder(&self) -> &Style {
method get_valid (line 177) | pub const fn get_valid(&self) -> &Style {
method get_invalid (line 183) | pub const fn get_invalid(&self) -> &Style {
method get_context (line 191) | pub const fn get_context(&self) -> &Style {
method get_context_value (line 199) | pub const fn get_context_value(&self) -> &Style {
method default (line 210) | fn default() -> Self {
method default (line 216) | fn default() -> Self {
FILE: clap_builder/src/builder/tests.rs
function propagate_version (line 5) | fn propagate_version() {
function global_setting (line 18) | fn global_setting() {
function app_send_sync (line 33) | fn app_send_sync() {
function issue_2090 (line 39) | fn issue_2090() {
function arg_send_sync (line 55) | fn arg_send_sync() {
FILE: clap_builder/src/builder/value_hint.rs
type ValueHint (line 29) | pub enum ValueHint {
type Err (line 74) | type Err = String;
method from_str (line 75) | fn from_str(s: &str) -> Result<Self, <Self as FromStr>::Err> {
FILE: clap_builder/src/builder/value_parser.rs
type ValueParser (line 63) | pub struct ValueParser(ValueParserInner);
method new (line 112) | pub fn new<P>(other: P) -> Self
method bool (line 143) | pub const fn bool() -> Self {
method string (line 168) | pub const fn string() -> Self {
method os_string (line 200) | pub const fn os_string() -> Self {
method path_buf (line 226) | pub const fn path_buf() -> Self {
method parse_ref (line 235) | pub(crate) fn parse_ref(
method type_id (line 246) | pub fn type_id(&self) -> AnyValueId {
method possible_values (line 254) | pub fn possible_values(
method any_value_parser (line 260) | fn any_value_parser(&self) -> &dyn AnyValueParser {
method from (line 298) | fn from(p: P) -> Self {
method from (line 304) | fn from(p: _AnonymousValueParser) -> Self {
method from (line 334) | fn from(value: std::ops::Range<i64>) -> Self {
method from (line 365) | fn from(value: std::ops::RangeInclusive<i64>) -> Self {
method from (line 396) | fn from(value: std::ops::RangeFrom<i64>) -> Self {
method from (line 427) | fn from(value: std::ops::RangeTo<i64>) -> Self {
method from (line 458) | fn from(value: std::ops::RangeToInclusive<i64>) -> Self {
method from (line 489) | fn from(value: std::ops::RangeFull) -> Self {
method from (line 524) | fn from(values: [P; C]) -> Self {
method from (line 560) | fn from(values: Vec<P>) -> Self {
method fmt (line 567) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt:...
type ValueParserInner (line 65) | enum ValueParserInner {
method clone (line 579) | fn clone(&self) -> Self {
type AnyValueParser (line 591) | trait AnyValueParser: Send + Sync + 'static {
method parse_ref (line 592) | fn parse_ref(
method parse_ref_ (line 599) | fn parse_ref_(
method type_id (line 610) | fn type_id(&self) -> AnyValueId;
method possible_values (line 612) | fn possible_values(
method clone_any (line 616) | fn clone_any(&self) -> Box<dyn AnyValueParser>;
method parse_ref (line 624) | fn parse_ref(
method parse_ref_ (line 634) | fn parse_ref_(
method type_id (line 645) | fn type_id(&self) -> AnyValueId {
method possible_values (line 649) | fn possible_values(
method clone_any (line 655) | fn clone_any(&self) -> Box<dyn AnyValueParser> {
type TypedValueParser (line 711) | pub trait TypedValueParser: Clone + Send + Sync + 'static {
method parse_ref (line 718) | fn parse_ref(
method parse_ref_ (line 728) | fn parse_ref_(
method parse (line 741) | fn parse(
method parse_ (line 753) | fn parse_(
method possible_values (line 767) | fn possible_values(
method map (line 810) | fn map<T, F>(self, func: F) -> MapValueParser<Self, F>
method try_map (line 860) | fn try_map<T, E, F>(self, func: F) -> TryMapValueParser<Self, F>
type Value (line 876) | type Value = T;
method parse_ref (line 878) | fn parse_ref(
type Value (line 915) | type Value = String;
method parse_ref (line 917) | fn parse_ref(
method parse (line 926) | fn parse(
type Value (line 963) | type Value = std::ffi::OsString;
method parse_ref (line 965) | fn parse_ref(
method parse (line 974) | fn parse(
type Value (line 1005) | type Value = std::path::PathBuf;
method parse_ref (line 1007) | fn parse_ref(
method parse (line 1016) | fn parse(
type Value (line 1092) | type Value = E;
method parse_ref (line 1094) | fn parse_ref(
method possible_values (line 1139) | fn possible_values(
type Value (line 1206) | type Value = String;
method parse_ref (line 1208) | fn parse_ref(
method parse (line 1217) | fn parse(
method possible_values (line 1251) | fn possible_values(
type Value (line 1404) | type Value = T;
method parse_ref (line 1406) | fn parse_ref(
type Value (line 1603) | type Value = T;
method parse_ref (line 1605) | fn parse_ref(
type Value (line 1694) | type Value = bool;
method parse_ref (line 1696) | fn parse_ref(
method possible_values (line 1723) | fn possible_values(
type Value (line 1796) | type Value = bool;
method parse_ref (line 1798) | fn parse_ref(
method possible_values (line 1818) | fn possible_values(
type Value (line 1895) | type Value = bool;
method parse_ref (line 1897) | fn parse_ref(
method possible_values (line 1919) | fn possible_values(
type Value (line 1978) | type Value = String;
method parse_ref (line 1980) | fn parse_ref(
type Value (line 2038) | type Value = T;
method parse_ref (line 2040) | fn parse_ref(
method parse (line 2051) | fn parse(
method possible_values (line 2062) | fn possible_values(
type Value (line 2099) | type Value = T;
method parse_ref (line 2101) | fn parse_ref(
method possible_values (line 2118) | fn possible_values(
type Value (line 2189) | type Value = String;
method parse_ref (line 2191) | fn parse_ref(
method parse_ref_ (line 2200) | fn parse_ref_(
type StringValueParser (line 905) | pub struct StringValueParser {}
method new (line 909) | pub fn new() -> Self {
method default (line 943) | fn default() -> Self {
type OsStringValueParser (line 953) | pub struct OsStringValueParser {}
method new (line 957) | pub fn new() -> Self {
method default (line 985) | fn default() -> Self {
type PathBufValueParser (line 995) | pub struct PathBufValueParser {}
method new (line 999) | pub fn new() -> Self {
method default (line 1035) | fn default() -> Self {
type EnumValueParser (line 1079) | pub struct EnumValueParser<E: crate::ValueEnum + Clone + Send + Sync + '...
function new (line 1085) | pub fn new() -> Self {
method default (line 1151) | fn default() -> Self {
type PossibleValuesParser (line 1196) | pub struct PossibleValuesParser(Vec<super::PossibleValue>);
method new (line 1200) | pub fn new(values: impl Into<PossibleValuesParser>) -> Self {
method from (line 1263) | fn from(values: I) -> Self {
type RangedI64ValueParser (line 1315) | pub struct RangedI64ValueParser<T: TryFrom<i64> + Clone + Send + Sync = ...
function new (line 1322) | pub fn new() -> Self {
function range (line 1327) | pub fn range<B: RangeBounds<i64>>(mut self, range: B) -> Self {
function format_bounds (line 1377) | fn format_bounds(&self) -> String {
function from (line 1461) | fn from(range: B) -> Self {
method default (line 1470) | fn default() -> Self {
type RangedU64ValueParser (line 1514) | pub struct RangedU64ValueParser<T: TryFrom<u64> = u64> {
function new (line 1521) | pub fn new() -> Self {
function range (line 1526) | pub fn range<B: RangeBounds<u64>>(mut self, range: B) -> Self {
function format_bounds (line 1576) | fn format_bounds(&self) -> String {
function from (line 1658) | fn from(range: B) -> Self {
method default (line 1667) | fn default() -> Self {
type BoolValueParser (line 1677) | pub struct BoolValueParser {}
method new (line 1681) | pub fn new() -> Self {
method possible_values (line 1685) | fn possible_values() -> impl Iterator<Item = crate::builder::PossibleV...
method default (line 1731) | fn default() -> Self {
type FalseyValueParser (line 1778) | pub struct FalseyValueParser {}
method new (line 1782) | pub fn new() -> Self {
method possible_values (line 1786) | fn possible_values() -> impl Iterator<Item = crate::builder::PossibleV...
method default (line 1826) | fn default() -> Self {
type BoolishValueParser (line 1877) | pub struct BoolishValueParser {}
method new (line 1881) | pub fn new() -> Self {
method possible_values (line 1885) | fn possible_values() -> impl Iterator<Item = crate::builder::PossibleV...
method default (line 1927) | fn default() -> Self {
type NonEmptyStringValueParser (line 1968) | pub struct NonEmptyStringValueParser {}
method new (line 1972) | pub fn new() -> Self {
method default (line 2005) | fn default() -> Self {
type MapValueParser (line 2014) | pub struct MapValueParser<P, F> {
function new (line 2026) | fn new(parser: P, func: F) -> Self {
type TryMapValueParser (line 2073) | pub struct TryMapValueParser<P, F> {
function new (line 2086) | fn new(parser: P, func: F) -> Self {
type UnknownArgumentValueParser (line 2159) | pub struct UnknownArgumentValueParser {
method suggest_arg (line 2166) | pub fn suggest_arg(arg: impl Into<Str>) -> Self {
method suggest (line 2174) | pub fn suggest(text: impl Into<StyledStr>) -> Self {
method and_suggest (line 2182) | pub fn and_suggest(mut self, text: impl Into<StyledStr>) -> Self {
type ValueParserFactory (line 2276) | pub trait ValueParserFactory {
method value_parser (line 2284) | fn value_parser() -> Self::Parser;
type Parser (line 2287) | type Parser = ValueParser;
method value_parser (line 2288) | fn value_parser() -> Self::Parser {
type Parser (line 2293) | type Parser = MapValueParser<StringValueParser, fn(String) -> Box<str>>;
method value_parser (line 2294) | fn value_parser() -> Self::Parser {
type Parser (line 2299) | type Parser = ValueParser;
method value_parser (line 2300) | fn value_parser() -> Self::Parser {
type Parser (line 2305) | type Parser =
method value_parser (line 2307) | fn value_parser() -> Self::Parser {
type Parser (line 2312) | type Parser = ValueParser;
method value_parser (line 2313) | fn value_parser() -> Self::Parser {
type Parser (line 2318) | type Parser =
method value_parser (line 2320) | fn value_parser() -> Self::Parser {
type Parser (line 2325) | type Parser = ValueParser;
method value_parser (line 2326) | fn value_parser() -> Self::Parser {
type Parser (line 2331) | type Parser = RangedI64ValueParser<u8>;
method value_parser (line 2332) | fn value_parser() -> Self::Parser {
type Parser (line 2339) | type Parser = RangedI64ValueParser<i8>;
method value_parser (line 2340) | fn value_parser() -> Self::Parser {
type Parser (line 2347) | type Parser = RangedI64ValueParser<u16>;
method value_parser (line 2348) | fn value_parser() -> Self::Parser {
type Parser (line 2355) | type Parser = RangedI64ValueParser<i16>;
method value_parser (line 2356) | fn value_parser() -> Self::Parser {
type Parser (line 2363) | type Parser = RangedI64ValueParser<u32>;
method value_parser (line 2364) | fn value_parser() -> Self::Parser {
type Parser (line 2371) | type Parser = RangedI64ValueParser<i32>;
method value_parser (line 2372) | fn value_parser() -> Self::Parser {
type Parser (line 2379) | type Parser = RangedU64ValueParser<u64>;
method value_parser (line 2380) | fn value_parser() -> Self::Parser {
type Parser (line 2385) | type Parser = RangedI64ValueParser<i64>;
method value_parser (line 2386) | fn value_parser() -> Self::Parser {
type Parser (line 2396) | type Parser =
method value_parser (line 2398) | fn value_parser() -> Self::Parser {
type Parser (line 2408) | type Parser = MapValueParser<<T as ValueParserFactory>::Parser, fn(T) ...
method value_parser (line 2409) | fn value_parser() -> Self::Parser {
type Parser (line 2419) | type Parser = MapValueParser<<T as ValueParserFactory>::Parser, fn(T) ...
method value_parser (line 2420) | fn value_parser() -> Self::Parser {
type Parser (line 2430) | type Parser = MapValueParser<<T as ValueParserFactory>::Parser, fn(T) ...
method value_parser (line 2431) | fn value_parser() -> Self::Parser {
type _infer_ValueParser_for (line 2439) | pub struct _infer_ValueParser_for<T>(std::marker::PhantomData<T>);
function new (line 2444) | pub fn new() -> Self {
type _AnonymousValueParser (line 2454) | pub struct _AnonymousValueParser(ValueParser);
type _impls_ValueParserFactory (line 2462) | pub trait _impls_ValueParserFactory: private::_impls_ValueParserFactoryS...
method value_parser (line 2464) | fn value_parser(&self) -> Self::Parser;
type Parser (line 2467) | type Parser = P::Parser;
method value_parser (line 2468) | fn value_parser(&self) -> Self::Parser {
type _impls_ValueEnum (line 2475) | pub trait _impls_ValueEnum: private::_impls_ValueEnumSealed {
method value_parser (line 2478) | fn value_parser(&self) -> Self::Output;
type Output (line 2483) | type Output = EnumValueParser<E>;
method value_parser (line 2485) | fn value_parser(&self) -> Self::Output {
type _impls_From_OsString (line 2492) | pub trait _impls_From_OsString: private::_impls_From_OsStringSealed {
method value_parser (line 2493) | fn value_parser(&self) -> _AnonymousValueParser;
method value_parser (line 2499) | fn value_parser(&self) -> _AnonymousValueParser {
type _impls_From_OsStr (line 2510) | pub trait _impls_From_OsStr: private::_impls_From_OsStrSealed {
method value_parser (line 2511) | fn value_parser(&self) -> _AnonymousValueParser;
method value_parser (line 2518) | fn value_parser(&self) -> _AnonymousValueParser {
type _impls_From_String (line 2529) | pub trait _impls_From_String: private::_impls_From_StringSealed {
method value_parser (line 2530) | fn value_parser(&self) -> _AnonymousValueParser;
method value_parser (line 2536) | fn value_parser(&self) -> _AnonymousValueParser {
type _impls_From_str (line 2543) | pub trait _impls_From_str: private::_impls_From_strSealed {
method value_parser (line 2544) | fn value_parser(&self) -> _AnonymousValueParser;
method value_parser (line 2550) | fn value_parser(&self) -> _AnonymousValueParser {
type _impls_FromStr (line 2557) | pub trait _impls_FromStr: private::_impls_FromStrSealed {
method value_parser (line 2558) | fn value_parser(&self) -> _AnonymousValueParser;
method value_parser (line 2565) | fn value_parser(&self) -> _AnonymousValueParser {
type _impls_ValueParserFactorySealed (line 2638) | pub trait _impls_ValueParserFactorySealed {}
type _impls_ValueEnumSealed (line 2642) | pub trait _impls_ValueEnumSealed {}
type _impls_From_OsStringSealed (line 2646) | pub trait _impls_From_OsStringSealed {}
type _impls_From_OsStrSealed (line 2653) | pub trait _impls_From_OsStrSealed {}
type _impls_From_StringSealed (line 2660) | pub trait _impls_From_StringSealed {}
type _impls_From_strSealed (line 2667) | pub trait _impls_From_strSealed {}
type _impls_FromStrSealed (line 2674) | pub trait _impls_FromStrSealed {}
function ensure_typed_applies_to_parse (line 2688) | fn ensure_typed_applies_to_parse() {
FILE: clap_builder/src/derive.rs
type Parser (line 29) | pub trait Parser: FromArgMatches + CommandFactory + Sized {
method parse (line 31) | fn parse() -> Self {
method try_parse (line 46) | fn try_parse() -> Result<Self, Error> {
method parse_from (line 52) | fn parse_from<I, T>(itr: I) -> Self
method try_parse_from (line 71) | fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
method update_from (line 85) | fn update_from<I, T>(&mut self, itr: I)
method try_update_from (line 101) | fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
method parse (line 317) | fn parse() -> Self {
method try_parse (line 321) | fn try_parse() -> Result<Self, Error> {
method parse_from (line 325) | fn parse_from<I, It>(itr: I) -> Self
method try_parse_from (line 333) | fn try_parse_from<I, It>(itr: I) -> Result<Self, Error>
type CommandFactory (line 116) | pub trait CommandFactory: Sized {
method command (line 120) | fn command() -> Command;
method command_for_update (line 124) | fn command_for_update() -> Command;
method command (line 343) | fn command() -> Command {
method command_for_update (line 346) | fn command_for_update() -> Command {
type FromArgMatches (line 130) | pub trait FromArgMatches: Sized {
method from_arg_matches (line 165) | fn from_arg_matches(matches: &ArgMatches) -> Result<Self, Error>;
method from_arg_matches_mut (line 201) | fn from_arg_matches_mut(matches: &mut ArgMatches) -> Result<Self, Erro...
method update_from_arg_matches (line 206) | fn update_from_arg_matches(&mut self, matches: &ArgMatches) -> Result<...
method update_from_arg_matches_mut (line 209) | fn update_from_arg_matches_mut(&mut self, matches: &mut ArgMatches) ->...
method from_arg_matches (line 352) | fn from_arg_matches(matches: &ArgMatches) -> Result<Self, Error> {
method from_arg_matches_mut (line 355) | fn from_arg_matches_mut(matches: &mut ArgMatches) -> Result<Self, Erro...
method update_from_arg_matches (line 358) | fn update_from_arg_matches(&mut self, matches: &ArgMatches) -> Result<...
method update_from_arg_matches_mut (line 361) | fn update_from_arg_matches_mut(&mut self, matches: &mut ArgMatches) ->...
method from_arg_matches (line 393) | fn from_arg_matches(_matches: &ArgMatches) -> Result<Self, Error> {
method update_from_arg_matches (line 397) | fn update_from_arg_matches(&mut self, _matches: &ArgMatches) -> Result...
method from_arg_matches (line 427) | fn from_arg_matches(_matches: &ArgMatches) -> Result<Self, Error> {
method update_from_arg_matches (line 434) | fn update_from_arg_matches(&mut self, _matches: &ArgMatches) -> Result...
type Args (line 227) | pub trait Args: FromArgMatches + Sized {
method group_id (line 229) | fn group_id() -> Option<crate::Id> {
method augment_args (line 238) | fn augment_args(cmd: Command) -> Command;
method augment_args_for_update (line 245) | fn augment_args_for_update(cmd: Command) -> Command;
method augment_args (line 367) | fn augment_args(cmd: Command) -> Command {
method augment_args_for_update (line 370) | fn augment_args_for_update(cmd: Command) -> Command {
method augment_args (line 403) | fn augment_args(cmd: Command) -> Command {
method augment_args_for_update (line 407) | fn augment_args_for_update(cmd: Command) -> Command {
type Subcommand (line 262) | pub trait Subcommand: FromArgMatches + Sized {
method augment_subcommands (line 269) | fn augment_subcommands(cmd: Command) -> Command;
method augment_subcommands_for_update (line 276) | fn augment_subcommands_for_update(cmd: Command) -> Command;
method has_subcommand (line 278) | fn has_subcommand(name: &str) -> bool;
method augment_subcommands (line 376) | fn augment_subcommands(cmd: Command) -> Command {
method augment_subcommands_for_update (line 379) | fn augment_subcommands_for_update(cmd: Command) -> Command {
method has_subcommand (line 382) | fn has_subcommand(name: &str) -> bool {
method augment_subcommands (line 413) | fn augment_subcommands(cmd: Command) -> Command {
method augment_subcommands_for_update (line 417) | fn augment_subcommands_for_update(cmd: Command) -> Command {
method has_subcommand (line 421) | fn has_subcommand(_name: &str) -> bool {
method augment_subcommands (line 442) | fn augment_subcommands(cmd: Command) -> Command {
method augment_subcommands_for_update (line 446) | fn augment_subcommands_for_update(cmd: Command) -> Command {
method has_subcommand (line 450) | fn has_subcommand(_name: &str) -> bool {
type ValueEnum (line 293) | pub trait ValueEnum: Sized + Clone {
method value_variants (line 295) | fn value_variants<'a>() -> &'a [Self];
method from_str (line 298) | fn from_str(input: &str, ignore_case: bool) -> Result<Self, String> {
method to_possible_value (line 313) | fn to_possible_value(&self) -> Option<PossibleValue>;
function format_error (line 387) | fn format_error<I: CommandFactory>(err: Error) -> Error {
FILE: clap_builder/src/error/context.rs
type ContextKind (line 5) | pub enum ContextKind {
method as_str (line 44) | pub fn as_str(self) -> Option<&'static str> {
method fmt (line 68) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type ContextValue (line 77) | pub enum ContextValue {
method fmt (line 95) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
FILE: clap_builder/src/error/format.rs
type ErrorFormatter (line 21) | pub trait ErrorFormatter: Sized {
method format_error (line 23) | fn format_error(error: &crate::error::Error<Self>) -> StyledStr;
method format_error (line 40) | fn format_error(error: &crate::error::Error<Self>) -> StyledStr {
method format_error (line 67) | fn format_error(error: &crate::error::Error<Self>) -> StyledStr {
type KindFormatter (line 37) | pub struct KindFormatter;
type RichFormatter (line 63) | pub struct RichFormatter;
function start_error (line 132) | fn start_error(styled: &mut StyledStr, styles: &Styles) {
function write_dynamic_context (line 140) | fn write_dynamic_context(
function write_values_list (line 374) | fn write_values_list(
function format_error_message (line 397) | pub(crate) fn format_error_message(
function singular_or_plural (line 416) | fn singular_or_plural(n: usize) -> &'static str {
function put_usage (line 424) | fn put_usage(styled: &mut StyledStr, usage: &StyledStr) {
function get_help_flag (line 429) | pub(crate) fn get_help_flag(cmd: &Command) -> Option<Cow<'static, str>> {
function get_user_help_flag (line 441) | fn get_user_help_flag(cmd: &Command) -> Option<String> {
function try_help (line 457) | fn try_help(styled: &mut StyledStr, styles: &Styles, help: Option<&str>) {
function did_you_mean (line 471) | fn did_you_mean(styled: &mut StyledStr, styles: &Styles, context: &str, ...
FILE: clap_builder/src/error/kind.rs
type ErrorKind (line 4) | pub enum ErrorKind {
method as_str (line 334) | pub fn as_str(self) -> Option<&'static str> {
method fmt (line 362) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
FILE: clap_builder/src/error/mod.rs
type Result (line 53) | pub type Result<T, E = Error> = StdResult<T, E>;
type Error (line 60) | pub struct Error<F: ErrorFormatter = DefaultFormatter> {
type ErrorInner (line 66) | struct ErrorInner {
function raw (line 88) | pub fn raw(kind: ErrorKind, message: impl Display) -> Self {
function format (line 94) | pub fn format(mut self, cmd: &mut Command) -> Self {
function new (line 128) | pub fn new(kind: ErrorKind) -> Self {
function with_cmd (line 149) | pub fn with_cmd(self, cmd: &Command) -> Self {
function apply (line 172) | pub fn apply<EF: ErrorFormatter>(self) -> Error<EF> {
function kind (line 180) | pub fn kind(&self) -> ErrorKind {
function context (line 186) | pub fn context(&self) -> impl Iterator<Item = (ContextKind, &ContextValu...
function get (line 193) | pub fn get(&self, kind: ContextKind) -> Option<&ContextValue> {
function insert (line 202) | pub fn insert(&mut self, kind: ContextKind, value: ContextValue) -> Opti...
function remove (line 212) | pub fn remove(&mut self, kind: ContextKind) -> Option<ContextValue> {
function use_stderr (line 218) | pub fn use_stderr(&self) -> bool {
function stream (line 222) | pub(crate) fn stream(&self) -> Stream {
function exit_code (line 233) | pub fn exit_code(&self) -> i32 {
function exit (line 245) | pub fn exit(&self) -> ! {
function print (line 268) | pub fn print(&self) -> io::Result<()> {
function render (line 300) | pub fn render(&self) -> StyledStr {
function for_app (line 305) | fn for_app(kind: ErrorKind, cmd: &Command, styled: StyledStr) -> Self {
function set_message (line 309) | pub(crate) fn set_message(mut self, message: impl Into<Message>) -> Self {
function set_source (line 314) | pub(crate) fn set_source(mut self, source: Box<dyn error::Error + Send +...
function set_styles (line 319) | pub(crate) fn set_styles(mut self, styles: Styles) -> Self {
function set_color (line 324) | pub(crate) fn set_color(mut self, color_when: ColorChoice) -> Self {
function set_colored_help (line 329) | pub(crate) fn set_colored_help(mut self, color_help_when: ColorChoice) -...
function set_help_flag (line 334) | pub(crate) fn set_help_flag(mut self, help_flag: Option<Cow<'static, str...
function insert_context_unchecked (line 342) | pub(crate) fn insert_context_unchecked(
function extend_context_unchecked (line 354) | pub(crate) fn extend_context_unchecked<const N: usize>(
function display_help (line 362) | pub(crate) fn display_help(cmd: &Command, styled: StyledStr) -> Self {
function display_help_error (line 366) | pub(crate) fn display_help_error(cmd: &Command, styled: StyledStr) -> Se...
function display_version (line 374) | pub(crate) fn display_version(cmd: &Command, styled: StyledStr) -> Self {
function argument_conflict (line 378) | pub(crate) fn argument_conflict(
function subcommand_conflict (line 406) | pub(crate) fn subcommand_conflict(
function empty_value (line 434) | pub(crate) fn empty_value(cmd: &Command, good_vals: &[String], arg: Stri...
function no_equals (line 438) | pub(crate) fn no_equals(cmd: &Command, arg: String, usage: Option<Styled...
function invalid_value (line 454) | pub(crate) fn invalid_value(
function invalid_subcommand (line 484) | pub(crate) fn invalid_subcommand(
function unrecognized_subcommand (line 530) | pub(crate) fn unrecognized_subcommand(
function missing_required_argument (line 552) | pub(crate) fn missing_required_argument(
function missing_subcommand (line 574) | pub(crate) fn missing_subcommand(
function invalid_utf8 (line 600) | pub(crate) fn invalid_utf8(cmd: &Command, usage: Option<StyledStr>) -> S...
function too_many_values (line 614) | pub(crate) fn too_many_values(
function too_few_values (line 637) | pub(crate) fn too_few_values(
function value_validation (line 668) | pub(crate) fn value_validation(
function wrong_number_of_values (line 686) | pub(crate) fn wrong_number_of_values(
function unknown_argument (line 717) | pub(crate) fn unknown_argument(
function unnecessary_double_dash (line 773) | pub(crate) fn unnecessary_double_dash(
function formatted (line 808) | fn formatted(&self) -> Cow<'_, StyledStr> {
function from (line 819) | fn from(e: io::Error) -> Self {
function from (line 825) | fn from(e: fmt::Error) -> Self {
method fmt (line 831) | fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), fmt::Error> {
function source (line 838) | fn source(&self) -> Option<&(dyn error::Error + 'static)> {
method fmt (line 844) | fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
type Message (line 857) | pub(crate) enum Message {
method format (line 863) | fn format(&mut self, cmd: &Command, usage: Option<StyledStr>) {
method formatted (line 882) | fn formatted(&self, styles: &Styles) -> Cow<'_, StyledStr> {
method from (line 895) | fn from(inner: String) -> Self {
method from (line 901) | fn from(inner: StyledStr) -> Self {
type Backtrace (line 908) | struct Backtrace(backtrace::Backtrace);
method new (line 912) | fn new() -> Option<Self> {
method new (line 931) | fn new() -> Option<Self> {
method fmt (line 919) | fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
type Backtrace (line 927) | struct Backtrace;
method new (line 912) | fn new() -> Option<Self> {
method new (line 931) | fn new() -> Option<Self> {
method fmt (line 938) | fn fmt(&self, _: &mut Formatter<'_>) -> fmt::Result {
function check_auto_traits (line 944) | fn check_auto_traits() {
FILE: clap_builder/src/lib.rs
type Error (line 30) | pub type Error = error::Error<error::DefaultFormatter>;
constant INTERNAL_ERROR_MSG (line 48) | const INTERNAL_ERROR_MSG: &str = "Fatal internal error. Please consider ...
type ReadmeDoctests (line 53) | pub struct ReadmeDoctests;
FILE: clap_builder/src/mkeymap.rs
type Key (line 9) | pub(crate) struct Key {
type MKeyMap (line 15) | pub(crate) struct MKeyMap {
method contains (line 86) | pub(crate) fn contains<K>(&self, key: K) -> bool
method push (line 94) | pub(crate) fn push(&mut self, new_arg: Arg) {
method get (line 101) | pub(crate) fn get<K: ?Sized>(&self, key: &K) -> Option<&Arg>
method keys (line 112) | pub(crate) fn keys(&self) -> impl Iterator<Item = &KeyType> {
method args (line 117) | pub(crate) fn args(&self) -> impl Iterator<Item = &Arg> {
method args_mut (line 122) | pub(crate) fn args_mut(&mut self) -> impl Iterator<Item = &mut Arg> {
method mut_args (line 127) | pub(crate) fn mut_args<F>(&mut self, f: F)
method _build (line 137) | pub(crate) fn _build(&mut self) {
method remove_by_name (line 147) | pub(crate) fn remove_by_name(&mut self, name: &str) -> Option<Arg> {
type Output (line 157) | type Output = Arg;
method index (line 159) | fn index(&self, key: &KeyType) -> &Self::Output {
type KeyType (line 25) | pub(crate) enum KeyType {
method is_position (line 32) | pub(crate) fn is_position(&self) -> bool {
method eq (line 38) | fn eq(&self, rhs: &usize) -> bool {
method eq (line 47) | fn eq(&self, rhs: &&str) -> bool {
method eq (line 56) | fn eq(&self, rhs: &str) -> bool {
method eq (line 65) | fn eq(&self, rhs: &OsStr) -> bool {
method eq (line 74) | fn eq(&self, rhs: &char) -> bool {
function append_keys (line 165) | fn append_keys(keys: &mut Vec<Key>, arg: &Arg, index: usize) {
FILE: clap_builder/src/output/fmt.rs
type Stream (line 5) | pub(crate) enum Stream {
type Colorizer (line 11) | pub(crate) struct Colorizer {
method new (line 19) | pub(crate) fn new(stream: Stream, color_when: ColorChoice) -> Self {
method with_content (line 27) | pub(crate) fn with_content(mut self, content: StyledStr) -> Self {
method print (line 36) | pub(crate) fn print(&self) -> std::io::Result<()> {
method print (line 60) | pub(crate) fn print(&self) -> std::io::Result<()> {
method fmt (line 80) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
FILE: clap_builder/src/output/help.rs
function write_help (line 9) | pub(crate) fn write_help(writer: &mut StyledStr, cmd: &Command, usage: &...
FILE: clap_builder/src/output/help_template.rs
type AutoHelp (line 26) | pub(crate) struct AutoHelp<'cmd, 'writer> {
function new (line 33) | pub(crate) fn new(
function write_help (line 44) | pub(crate) fn write_help(&mut self) {
constant DEFAULT_TEMPLATE (line 66) | const DEFAULT_TEMPLATE: &str = "\
constant DEFAULT_NO_ARGS_TEMPLATE (line 73) | const DEFAULT_NO_ARGS_TEMPLATE: &str = "\
constant SHORT_SIZE (line 78) | const SHORT_SIZE: usize = 4;
type HelpTemplate (line 83) | pub(crate) struct HelpTemplate<'cmd, 'writer> {
function new (line 96) | pub(crate) fn new(
function term_w (line 122) | fn term_w(cmd: &'cmd Command) -> usize {
function term_w (line 139) | fn term_w(cmd: &'cmd Command) -> usize {
function write_templated_help (line 163) | pub(crate) fn write_templated_help(&mut self, template: &str) {
function write_display_name (line 259) | fn write_display_name(&mut self) {
function write_bin_name (line 275) | fn write_bin_name(&mut self) {
function write_version (line 291) | fn write_version(&mut self) {
function write_author (line 301) | fn write_author(&mut self, before_new_line: bool, after_new_line: bool) {
function write_about (line 313) | fn write_about(&mut self, before_new_line: bool, after_new_line: bool) {
function write_before_help (line 333) | fn write_before_help(&mut self) {
function write_after_help (line 351) | fn write_after_help(&mut self) {
function write_all_args (line 374) | pub(crate) fn write_all_args(&mut self) {
function write_args (line 470) | fn write_args(&mut self, args: &[&Arg], _category: &str, sort_key: ArgSo...
function write_arg (line 514) | fn write_arg(&mut self, arg: &Arg, next_line_help: bool, longest: usize) {
function short (line 538) | fn short(&mut self, arg: &Arg) {
function long (line 551) | fn long(&mut self, arg: &Arg) {
function align_to_about (line 565) | fn align_to_about(&mut self, arg: &Arg, next_line_help: bool, longest: u...
function help (line 608) | fn help(
function will_args_wrap (line 729) | fn will_args_wrap(&self, args: &[&Arg], longest: usize) -> bool {
function arg_next_line_help (line 738) | fn arg_next_line_help(&self, arg: &Arg, spec_vals: &str, longest: usize)...
function spec_vals (line 756) | fn spec_vals(&self, a: &Arg) -> String {
function get_spaces (line 856) | fn get_spaces(&self, n: usize) -> String {
function write_padding (line 860) | fn write_padding(&mut self, amount: usize) {
function use_long_pv (line 865) | fn use_long_pv(&self, arg: &Arg) -> bool {
function write_flat_subcommands (line 877) | fn write_flat_subcommands(&mut self, cmd: &Command, first: &mut bool) {
function write_subcommands (line 938) | fn write_subcommands(&mut self, cmd: &Command) {
function will_subcommands_wrap (line 976) | fn will_subcommands_wrap<'a>(
function write_subcommand (line 990) | fn write_subcommand(
function sc_spec_vals (line 1010) | fn sc_spec_vals(&self, a: &Command) -> String {
function subcommand_next_line_help (line 1049) | fn subcommand_next_line_help(&self, cmd: &Command, spec_vals: &str, long...
function subcmd (line 1069) | fn subcmd(&mut self, sc_str: StyledStr, next_line_help: bool, longest: u...
constant NEXT_LINE_INDENT (line 1080) | const NEXT_LINE_INDENT: &str = " ";
type ArgSortKey (line 1082) | type ArgSortKey = fn(arg: &Arg) -> (usize, String);
function positional_sort_key (line 1084) | fn positional_sort_key(arg: &Arg) -> (usize, String) {
function option_sort_key (line 1088) | fn option_sort_key(arg: &Arg) -> (usize, String) {
function dimensions (line 1111) | pub(crate) fn dimensions() -> (Option<usize>, Option<usize>) {
function parse_env (line 1122) | fn parse_env(var: &str) -> Option<usize> {
function should_show_arg (line 1128) | fn should_show_arg(use_long: bool, arg: &Arg) -> bool {
function should_show_subcommand (line 1142) | fn should_show_subcommand(subcommand: &Command) -> bool {
function wrap_help_last_word (line 1150) | fn wrap_help_last_word() {
function display_width_handles_non_ascii (line 1159) | fn display_width_handles_non_ascii() {
function display_width_handles_emojis (line 1172) | fn display_width_handles_emojis() {
FILE: clap_builder/src/output/mod.rs
constant TAB (line 21) | pub(crate) const TAB: &str = " ";
constant TAB_WIDTH (line 23) | pub(crate) const TAB_WIDTH: usize = TAB.len();
FILE: clap_builder/src/output/textwrap/core.rs
function display_width (line 55) | pub(crate) fn display_width(text: &str) -> usize {
function ch_width (line 77) | fn ch_width(ch: char) -> usize {
function ch_width (line 82) | fn ch_width(_: char) -> usize {
function emojis_have_correct_width (line 94) | fn emojis_have_correct_width() {
function display_width_works (line 136) | fn display_width_works() {
function display_width_narrow_emojis (line 143) | fn display_width_narrow_emojis() {
function display_width_narrow_emojis_variant_selector (line 149) | fn display_width_narrow_emojis_variant_selector() {
function display_width_emojis (line 155) | fn display_width_emojis() {
FILE: clap_builder/src/output/textwrap/mod.rs
function wrap (line 14) | pub(crate) fn wrap(content: &str, hard_width: usize) -> String {
function wrap (line 26) | pub(crate) fn wrap(content: &str, _hard_width: usize) -> String {
function wrap (line 34) | fn wrap(content: &str, hard_width: usize) -> Vec<String> {
function no_wrap (line 43) | fn no_wrap() {
function wrap_simple (line 48) | fn wrap_simple() {
function to_be_or_not (line 53) | fn to_be_or_not() {
function multiple_words_on_first_line (line 61) | fn multiple_words_on_first_line() {
function long_word (line 66) | fn long_word() {
function long_words (line 71) | fn long_words() {
function max_width (line 76) | fn max_width() {
function leading_whitespace (line 85) | fn leading_whitespace() {
function leading_whitespace_empty_first_line (line 90) | fn leading_whitespace_empty_first_line() {
function trailing_whitespace (line 99) | fn trailing_whitespace() {
function issue_99 (line 107) | fn issue_99() {
function issue_129 (line 117) | fn issue_129() {
FILE: clap_builder/src/output/textwrap/word_separators.rs
function find_words_ascii_space (line 1) | pub(crate) fn find_words_ascii_space(line: &str) -> impl Iterator<Item =...
FILE: clap_builder/src/output/textwrap/wrap_algorithms.rs
type LineWrapper (line 4) | pub(crate) struct LineWrapper<'w> {
function new (line 11) | pub(crate) fn new(hard_width: usize) -> Self {
function reset (line 19) | pub(crate) fn reset(&mut self) {
function wrap (line 24) | pub(crate) fn wrap(&mut self, mut words: Vec<&'w str>) -> Vec<&'w str> {
FILE: clap_builder/src/output/usage.rs
constant USAGE_SEP (line 17) | const USAGE_SEP: &str = "\n ";
type Usage (line 19) | pub(crate) struct Usage<'cmd> {
function new (line 26) | pub(crate) fn new(cmd: &'cmd Command) -> Self {
function required (line 34) | pub(crate) fn required(mut self, required: &'cmd ChildGraph<Id>) -> Self {
function create_usage_with_title (line 41) | pub(crate) fn create_usage_with_title(&self, used: &[Id]) -> Option<Styl...
function create_usage_no_title (line 61) | pub(crate) fn create_usage_no_title(&self, used: &[Id]) -> Option<Styled...
function write_usage_no_title (line 75) | fn write_usage_no_title(&self, styled: &mut StyledStr, used: &[Id]) -> b...
function write_help_usage (line 102) | fn write_help_usage(&self, styled: &mut StyledStr) {
function write_smart_usage (line 135) | fn write_smart_usage(&self, styled: &mut StyledStr, used: &[Id]) {
function write_arg_usage (line 151) | fn write_arg_usage(&self, styled: &mut StyledStr, used: &[Id], incl_reqs...
function write_subcommand_usage (line 170) | fn write_subcommand_usage(&self, styled: &mut StyledStr) {
function needs_options_tag (line 204) | fn needs_options_tag(&self) -> bool {
function write_args (line 254) | pub(crate) fn write_args(&self, styled: &mut StyledStr, incls: &[Id], fo...
function get_required_usage_from (line 378) | pub(crate) fn get_required_usage_from(
FILE: clap_builder/src/parser/arg_matcher.rs
type ArgMatcher (line 17) | pub(crate) struct ArgMatcher {
method new (line 23) | pub(crate) fn new(_cmd: &Command) -> Self {
method into_inner (line 43) | pub(crate) fn into_inner(self) -> ArgMatches {
method propagate_globals (line 47) | pub(crate) fn propagate_globals(&mut self, global_arg_vec: &[Id]) {
method fill_in_global_values (line 53) | fn fill_in_global_values(
method get (line 93) | pub(crate) fn get(&self, arg: &Id) -> Option<&MatchedArg> {
method get_mut (line 97) | pub(crate) fn get_mut(&mut self, arg: &Id) -> Option<&mut MatchedArg> {
method remove (line 101) | pub(crate) fn remove(&mut self, arg: &Id) -> bool {
method contains (line 105) | pub(crate) fn contains(&self, arg: &Id) -> bool {
method arg_ids (line 109) | pub(crate) fn arg_ids(&self) -> std::slice::Iter<'_, Id> {
method args (line 113) | pub(crate) fn args(&self) -> crate::util::flat_map::Iter<'_, Id, Match...
method entry (line 117) | pub(crate) fn entry(&mut self, arg: Id) -> crate::util::Entry<'_, Id, ...
method subcommand (line 121) | pub(crate) fn subcommand(&mut self, sc: SubCommand) {
method subcommand_name (line 125) | pub(crate) fn subcommand_name(&self) -> Option<&str> {
method check_explicit (line 129) | pub(crate) fn check_explicit(&self, arg: &Id, predicate: &ArgPredicate...
method start_custom_arg (line 135) | pub(crate) fn start_custom_arg(&mut self, arg: &Arg, source: ValueSour...
method start_custom_group (line 144) | pub(crate) fn start_custom_group(&mut self, id: Id, source: ValueSourc...
method start_occurrence_of_external (line 152) | pub(crate) fn start_occurrence_of_external(&mut self, cmd: &Command) {
method add_val_to (line 168) | pub(crate) fn add_val_to(&mut self, arg: &Id, val: AnyValue, raw_val: ...
method add_index_to (line 173) | pub(crate) fn add_index_to(&mut self, arg: &Id, idx: usize) {
method needs_more_vals (line 178) | pub(crate) fn needs_more_vals(&self, o: &Arg) -> bool {
method pending_arg_id (line 194) | pub(crate) fn pending_arg_id(&self) -> Option<&Id> {
method pending_values_mut (line 198) | pub(crate) fn pending_values_mut(
method start_trailing (line 220) | pub(crate) fn start_trailing(&mut self) {
method take_pending (line 227) | pub(crate) fn take_pending(&mut self) -> Option<PendingArg> {
type Target (line 233) | type Target = ArgMatches;
method deref (line 235) | fn deref(&self) -> &Self::Target {
FILE: clap_builder/src/parser/error.rs
type MatchesError (line 7) | pub enum MatchesError {
method unwrap (line 25) | pub(crate) fn unwrap<T>(id: &str, r: Result<T, MatchesError>) -> T {
method fmt (line 39) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
function check_auto_traits (line 58) | fn check_auto_traits() {
FILE: clap_builder/src/parser/features/suggestions.rs
function did_you_mean (line 8) | pub(crate) fn did_you_mean<T, I>(v: &str, possible_values: I) -> Vec<Str...
function did_you_mean (line 40) | pub(crate) fn did_you_mean<T, I>(_: &str, _: I) -> Vec<String>
function did_you_mean_flag (line 49) | pub(crate) fn did_you_mean_flag<'a, 'help, I, T>(
function missing_letter (line 93) | fn missing_letter() {
function ambiguous (line 99) | fn ambiguous() {
function unrelated (line 105) | fn unrelated() {
function best_fit (line 114) | fn best_fit() {
function best_fit_long_common_prefix_issue_4660 (line 129) | fn best_fit_long_common_prefix_issue_4660() {
function flag_missing_letter (line 138) | fn flag_missing_letter() {
function flag_ambiguous (line 147) | fn flag_ambiguous() {
function flag_unrelated (line 156) | fn flag_unrelated() {
function flag_best_fit (line 165) | fn flag_best_fit() {
FILE: clap_builder/src/parser/matches/arg_matches.rs
type ArgMatches (line 67) | pub struct ArgMatches {
method get_one (line 118) | pub fn get_one<T: Any + Clone + Send + Sync + 'static>(&self, id: &str...
method get_count (line 148) | pub fn get_count(&self, id: &str) -> u8 {
method get_flag (line 181) | pub fn get_flag(&self, id: &str) -> bool {
method get_many (line 225) | pub fn get_many<T: Any + Clone + Send + Sync + 'static>(
method get_occurrences (line 263) | pub fn get_occurrences<T: Any + Clone + Send + Sync + 'static>(
method get_raw (line 313) | pub fn get_raw(&self, id: &str) -> Option<RawValues<'_>> {
method get_raw_occurrences (line 367) | pub fn get_raw_occurrences(&self, id: &str) -> Option<RawOccurrences<'...
method remove_one (line 410) | pub fn remove_one<T: Any + Clone + Send + Sync + 'static>(&mut self, i...
method remove_many (line 446) | pub fn remove_many<T: Any + Clone + Send + Sync + 'static>(
method remove_occurrences (line 485) | pub fn remove_occurrences<T: Any + Clone + Send + Sync + 'static>(
method contains_id (line 523) | pub fn contains_id(&self, id: &str) -> bool {
method ids (line 549) | pub fn ids(&self) -> IdsRef<'_> {
method args_present (line 578) | pub fn args_present(&self) -> bool {
method value_source (line 609) | pub fn value_source(&self, id: &str) -> Option<ValueSource> {
method index_of (line 767) | pub fn index_of(&self, id: &str) -> Option<usize> {
method indices_of (line 855) | pub fn indices_of(&self, id: &str) -> Option<Indices<'_>> {
method subcommand (line 922) | pub fn subcommand(&self) -> Option<(&str, &ArgMatches)> {
method remove_subcommand (line 982) | pub fn remove_subcommand(&mut self) -> Option<(String, ArgMatches)> {
method subcommand_matches (line 1026) | pub fn subcommand_matches(&self, name: &str) -> Option<&ArgMatches> {
method subcommand_name (line 1055) | pub fn subcommand_name(&self) -> Option<&str> {
method is_valid_subcommand (line 1066) | pub fn is_valid_subcommand(&self, _name: &str) -> bool {
method try_get_one (line 1081) | pub fn try_get_one<T: Any + Clone + Send + Sync + 'static>(
method try_get_many (line 1099) | pub fn try_get_many<T: Any + Clone + Send + Sync + 'static>(
method try_get_occurrences (line 1118) | pub fn try_get_occurrences<T: Any + Clone + Send + Sync + 'static>(
method try_get_raw (line 1135) | pub fn try_get_raw(&self, id: &str) -> Result<Option<RawValues<'_>>, M...
method try_get_raw_occurrences (line 1150) | pub fn try_get_raw_occurrences(
method try_remove_one (line 1168) | pub fn try_remove_one<T: Any + Clone + Send + Sync + 'static>(
method try_remove_many (line 1183) | pub fn try_remove_many<T: Any + Clone + Send + Sync + 'static>(
method try_remove_occurrences (line 1202) | pub fn try_remove_occurrences<T: Any + Clone + Send + Sync + 'static>(
method try_contains_id (line 1220) | pub fn try_contains_id(&self, id: &str) -> Result<bool, MatchesError> {
method try_clear_id (line 1234) | pub fn try_clear_id(&mut self, id: &str) -> Result<bool, MatchesError> {
method try_get_arg (line 1243) | fn try_get_arg(&self, arg: &str) -> Result<Option<&MatchedArg>, Matche...
method try_get_arg_t (line 1249) | fn try_get_arg_t<T: Any + Send + Sync + 'static>(
method try_remove_arg_t (line 1264) | fn try_remove_arg_t<T: Any + Send + Sync + 'static>(
method verify_arg_t (line 1286) | fn verify_arg_t<T: Any + Send + Sync + 'static>(
method verify_arg (line 1300) | fn verify_arg(&self, _arg: &str) -> Result<(), MatchesError> {
method get_arg (line 1319) | fn get_arg<'s>(&'s self, arg: &str) -> Option<&'s MatchedArg> {
method get_subcommand (line 1337) | fn get_subcommand(&self, name: &str) -> Option<&SubCommand> {
type SubCommand (line 1357) | pub(crate) struct SubCommand {
type IdsRef (line 1384) | pub struct IdsRef<'a> {
type Item (line 1389) | type Item = &'a Id;
method next (line 1391) | fn next(&mut self) -> Option<&'a Id> {
method size_hint (line 1394) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 1400) | fn next_back(&mut self) -> Option<&'a Id> {
type Values (line 1428) | pub struct Values<T> {
type Item (line 1435) | type Item = T;
method next (line 1437) | fn next(&mut self) -> Option<Self::Item> {
method size_hint (line 1445) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 1451) | fn next_back(&mut self) -> Option<Self::Item> {
method default (line 1465) | fn default() -> Self {
type ValuesRef (line 1496) | pub struct ValuesRef<'a, T> {
type Item (line 1503) | type Item = &'a T;
method next (line 1505) | fn next(&mut self) -> Option<Self::Item> {
method size_hint (line 1513) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 1519) | fn next_back(&mut self) -> Option<Self::Item> {
method default (line 1533) | fn default() -> Self {
type RawValues (line 1569) | pub struct RawValues<'a> {
type Item (line 1576) | type Item = &'a OsStr;
method next (line 1578) | fn next(&mut self) -> Option<&'a OsStr> {
method size_hint (line 1586) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 1592) | fn next_back(&mut self) -> Option<&'a OsStr> {
method default (line 1606) | fn default() -> Self {
type Occurrences (line 1621) | pub struct Occurrences<T> {
type Item (line 1627) | type Item = OccurrenceValues<T>;
method next (line 1629) | fn next(&mut self) -> Option<Self::Item> {
method size_hint (line 1633) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 1639) | fn next_back(&mut self) -> Option<Self::Item> {
method default (line 1647) | fn default() -> Self {
type OccurrenceValues (line 1656) | pub struct OccurrenceValues<T> {
type Item (line 1662) | type Item = T;
method next (line 1664) | fn next(&mut self) -> Option<Self::Item> {
method size_hint (line 1668) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 1674) | fn next_back(&mut self) -> Option<Self::Item> {
type OccurrencesRef (line 1682) | pub struct OccurrencesRef<'a, T> {
type Item (line 1691) | type Item = OccurrenceValuesRef<'a, T>;
method next (line 1693) | fn next(&mut self) -> Option<Self::Item> {
method size_hint (line 1697) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 1706) | fn next_back(&mut self) -> Option<Self::Item> {
method default (line 1713) | fn default() -> Self {
type OccurrenceValuesRef (line 1722) | pub struct OccurrenceValuesRef<'a, T> {
type Item (line 1731) | type Item = &'a T;
method next (line 1733) | fn next(&mut self) -> Option<Self::Item> {
method size_hint (line 1737) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 1746) | fn next_back(&mut self) -> Option<Self::Item> {
type RawOccurrences (line 1754) | pub struct RawOccurrences<'a> {
type Item (line 1760) | type Item = RawOccurrenceValues<'a>;
method next (line 1762) | fn next(&mut self) -> Option<Self::Item> {
method size_hint (line 1766) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 1772) | fn next_back(&mut self) -> Option<Self::Item> {
method default (line 1780) | fn default() -> Self {
type RawOccurrenceValues (line 1789) | pub struct RawOccurrenceValues<'a> {
type Item (line 1798) | type Item = &'a OsStr;
method next (line 1800) | fn next(&mut self) -> Option<Self::Item> {
method size_hint (line 1804) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 1813) | fn next_back(&mut self) -> Option<Self::Item> {
type Indices (line 1842) | pub struct Indices<'a> {
type Item (line 1848) | type Item = usize;
method next (line 1850) | fn next(&mut self) -> Option<usize> {
method size_hint (line 1858) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 1864) | fn next_back(&mut self) -> Option<usize> {
method default (line 1878) | fn default() -> Self {
function unwrap_downcast_ref (line 1889) | fn unwrap_downcast_ref<T: Any + Clone + Send + Sync + 'static>(value: &A...
function unwrap_downcast_into (line 1894) | fn unwrap_downcast_into<T: Any + Clone + Send + Sync + 'static>(value: A...
function check_auto_traits (line 1905) | fn check_auto_traits() {
function test_default_raw_values (line 1910) | fn test_default_raw_values() {
function test_default_indices (line 1916) | fn test_default_indices() {
function test_default_indices_with_shorter_lifetime (line 1922) | fn test_default_indices_with_shorter_lifetime() {
function values_exact_size (line 1929) | fn values_exact_size() {
function os_values_exact_size (line 1946) | fn os_values_exact_size() {
function indices_exact_size (line 1964) | fn indices_exact_size() {
function rev_iter (line 1981) | fn rev_iter() {
function delete_id_without_returning (line 2014) | fn delete_id_without_returning() {
FILE: clap_builder/src/parser/matches/matched_arg.rs
type MatchedArg (line 16) | pub(crate) struct MatchedArg {
method new_arg (line 26) | pub(crate) fn new_arg(arg: &crate::Arg) -> Self {
method new_group (line 38) | pub(crate) fn new_group() -> Self {
method new_external (line 50) | pub(crate) fn new_external(cmd: &crate::Command) -> Self {
method indices (line 66) | pub(crate) fn indices(&self) -> Cloned<Iter<'_, usize>> {
method get_index (line 70) | pub(crate) fn get_index(&self, index: usize) -> Option<usize> {
method push_index (line 74) | pub(crate) fn push_index(&mut self, index: usize) {
method vals (line 78) | pub(crate) fn vals(&self) -> Iter<'_, Vec<AnyValue>> {
method into_vals (line 82) | pub(crate) fn into_vals(self) -> Vec<Vec<AnyValue>> {
method vals_flatten (line 86) | pub(crate) fn vals_flatten(&self) -> Flatten<Iter<'_, Vec<AnyValue>>> {
method into_vals_flatten (line 90) | pub(crate) fn into_vals_flatten(self) -> Flatten<std::vec::IntoIter<Ve...
method raw_vals (line 94) | pub(crate) fn raw_vals(&self) -> Iter<'_, Vec<OsString>> {
method raw_vals_flatten (line 98) | pub(crate) fn raw_vals_flatten(&self) -> Flatten<Iter<'_, Vec<OsString...
method first (line 102) | pub(crate) fn first(&self) -> Option<&AnyValue> {
method first_raw (line 107) | pub(crate) fn first_raw(&self) -> Option<&OsString> {
method new_val_group (line 111) | pub(crate) fn new_val_group(&mut self) {
method append_val (line 116) | pub(crate) fn append_val(&mut self, val: AnyValue, raw_val: OsString) {
method num_vals (line 125) | pub(crate) fn num_vals(&self) -> usize {
method num_vals_last_group (line 131) | pub(crate) fn num_vals_last_group(&self) -> usize {
method check_explicit (line 135) | pub(crate) fn check_explicit(&self, predicate: &ArgPredicate) -> bool {
method source (line 153) | pub(crate) fn source(&self) -> Option<ValueSource> {
method set_source (line 157) | pub(crate) fn set_source(&mut self, source: ValueSource) {
method type_id (line 165) | pub(crate) fn type_id(&self) -> Option<AnyValueId> {
method infer_type_id (line 169) | pub(crate) fn infer_type_id(&self, expected: AnyValueId) -> AnyValueId {
method eq (line 181) | fn eq(&self, other: &MatchedArg) -> bool {
function test_grouped_vals_first (line 213) | fn test_grouped_vals_first() {
FILE: clap_builder/src/parser/matches/value_source.rs
type ValueSource (line 4) | pub enum ValueSource {
method is_explicit (line 14) | pub(crate) fn is_explicit(self) -> bool {
FILE: clap_builder/src/parser/parser.rs
type Parser (line 23) | pub(crate) struct Parser<'cmd> {
function new (line 35) | pub(crate) fn new(cmd: &'cmd mut Command) -> Self {
function get_matches_with (line 49) | pub(crate) fn get_matches_with(
function parse (line 77) | pub(crate) fn parse(
function match_arg_error (line 509) | fn match_arg_error(
function possible_subcommand (line 584) | fn possible_subcommand(
function possible_long_flag_subcommand (line 622) | fn possible_long_flag_subcommand(&self, arg: &str) -> Option<&str> {
function parse_help_subcommand (line 653) | fn parse_help_subcommand(
function is_new_arg (line 684) | fn is_new_arg(&self, next: &clap_lex::ParsedArg<'_>, current_positional:...
function parse_subcommand (line 716) | fn parse_subcommand(
function parse_long_arg (line 763) | fn parse_long_arg(
function parse_short_arg (line 882) | fn parse_short_arg(
function parse_opt_value (line 1018) | fn parse_opt_value(
function check_terminator (line 1084) | fn check_terminator(&self, arg: &Arg, val: &OsStr) -> Option<ParseResult> {
function push_arg_values (line 1093) | fn push_arg_values(
function resolve_pending (line 1119) | fn resolve_pending(&self, matcher: &mut ArgMatcher) -> ClapResult<()> {
function react (line 1141) | fn react(
function verify_num_args (line 1335) | fn verify_num_args(&self, arg: &Arg, raw_vals: &[OsString]) -> ClapResul...
function remove_overrides (line 1391) | fn remove_overrides(&self, arg: &Arg, matcher: &mut ArgMatcher) {
function add_env (line 1414) | fn add_env(&mut self, matcher: &mut ArgMatcher) -> ClapResult<()> {
function add_defaults (line 1444) | fn add_defaults(&self, matcher: &mut ArgMatcher) -> ClapResult<()> {
function add_default_value (line 1455) | fn add_default_value(&self, arg: &Arg, matcher: &mut ArgMatcher) -> Clap...
function start_custom_arg (line 1533) | fn start_custom_arg(&self, matcher: &mut ArgMatcher, arg: &Arg, source: ...
function did_you_mean_error (line 1555) | fn did_you_mean_error(
function help_err (line 1624) | fn help_err(&self, use_long: bool) -> ClapError {
function version_err (line 1629) | fn version_err(&self, use_long: bool) -> ClapError {
type ParseState (line 1636) | pub(crate) enum ParseState {
type ParseResult (line 1645) | enum ParseResult {
type PendingArg (line 1673) | pub(crate) struct PendingArg {
type Identifier (line 1681) | pub(crate) enum Identifier {
FILE: clap_builder/src/parser/validator.rs
type Validator (line 13) | pub(crate) struct Validator<'cmd> {
function new (line 19) | pub(crate) fn new(cmd: &'cmd Command) -> Self {
function validate (line 24) | pub(crate) fn validate(&mut self, matcher: &mut ArgMatcher) -> ClapResul...
function validate_conflicts (line 62) | fn validate_conflicts(
function validate_exclusive (line 84) | fn validate_exclusive(&self, matcher: &ArgMatcher) -> ClapResult<()> {
function build_conflict_err (line 124) | fn build_conflict_err(
function build_conflict_err_usage (line 164) | fn build_conflict_err_usage(
function gather_requires (line 196) | fn gather_requires(&mut self, matcher: &ArgMatcher) {
function validate_required (line 221) | fn validate_required(&mut self, matcher: &ArgMatcher, conflicts: &Confli...
function is_missing_required_ok (line 345) | fn is_missing_required_ok(&self, a: &Arg, conflicts: &Conflicts) -> bool {
function fails_arg_required_unless (line 361) | fn fails_arg_required_unless(&self, a: &Arg, matcher: &ArgMatcher) -> bo...
function missing_required_error (line 370) | fn missing_required_error(
type Conflicts (line 438) | struct Conflicts {
method with_args (line 443) | fn with_args(cmd: &Command, matcher: &ArgMatcher) -> Self {
method gather_conflicts (line 457) | fn gather_conflicts(&self, cmd: &Command, arg_id: &Id) -> Vec<Id> {
method get_direct_conflicts (line 486) | fn get_direct_conflicts(&self, arg_id: &Id) -> Option<&[Id]> {
function gather_direct_conflicts (line 491) | fn gather_direct_conflicts(cmd: &Command, id: &Id) -> Vec<Id> {
function gather_arg_direct_conflicts (line 504) | fn gather_arg_direct_conflicts(cmd: &Command, arg: &Arg) -> Vec<Id> {
function gather_group_direct_conflicts (line 524) | fn gather_group_direct_conflicts(group: &ArgGroup) -> Vec<Id> {
function get_possible_values_cli (line 528) | pub(crate) fn get_possible_values_cli(a: &Arg) -> Vec<PossibleValue> {
FILE: clap_builder/src/util/any_value.rs
type AnyValue (line 2) | pub(crate) struct AnyValue {
method new (line 10) | pub(crate) fn new<V: std::any::Any + Clone + Send + Sync + 'static>(in...
method downcast_ref (line 16) | pub(crate) fn downcast_ref<T: std::any::Any + Clone + Send + Sync + 's...
method downcast_into (line 22) | pub(crate) fn downcast_into<T: std::any::Any + Clone + Send + Sync>(se...
method type_id (line 30) | pub(crate) fn type_id(&self) -> AnyValueId {
method fmt (line 36) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt:...
type AnyValueId (line 42) | pub struct AnyValueId {
method of (line 49) | pub(crate) fn of<A: ?Sized + 'static>() -> Self {
method eq (line 73) | fn eq(&self, other: &std::any::TypeId) -> bool {
method hash (line 85) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
method fmt (line 91) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt:...
method from (line 104) | fn from(_: &'a A) -> Self {
method eq (line 59) | fn eq(&self, other: &Self) -> bool {
method partial_cmp (line 67) | fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
method cmp (line 79) | fn cmp(&self, other: &Self) -> std::cmp::Ordering {
function debug_impl (line 113) | fn debug_impl() {
function eq_to_type_id (line 120) | fn eq_to_type_id() {
FILE: clap_builder/src/util/color.rs
type ColorChoice (line 6) | pub enum ColorChoice {
method possible_values (line 62) | pub fn possible_values() -> impl Iterator<Item = PossibleValue> {
method fmt (line 70) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Err (line 79) | type Err = String;
method from_str (line 81) | fn from_str(s: &str) -> Result<Self, Self::Err> {
method value_variants (line 92) | fn value_variants<'a>() -> &'a [Self] {
method to_possible_value (line 96) | fn to_possible_value(&self) -> Option<PossibleValue> {
FILE: clap_builder/src/util/escape.rs
type Escape (line 4) | pub(crate) struct Escape<'s>(pub(crate) &'s str);
function needs_escaping (line 7) | pub(crate) fn needs_escaping(&self) -> bool {
function to_cow (line 12) | pub(crate) fn to_cow(&self) -> Cow<'s, str> {
function fmt (line 22) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
FILE: clap_builder/src/util/flat_map.rs
type FlatMap (line 9) | pub(crate) struct FlatMap<K, V> {
function new (line 15) | pub(crate) fn new() -> Self {
function insert (line 19) | pub(crate) fn insert(&mut self, key: K, mut value: V) -> Option<V> {
function insert_unchecked (line 31) | pub(crate) fn insert_unchecked(&mut self, key: K, value: V) {
function extend_unchecked (line 36) | pub(crate) fn extend_unchecked(&mut self, iter: impl IntoIterator<Item =...
function contains_key (line 42) | pub(crate) fn contains_key<Q: ?Sized>(&self, key: &Q) -> bool
function remove (line 55) | pub(crate) fn remove<Q: ?Sized>(&mut self, key: &Q) -> Option<V>
function remove_entry (line 63) | pub(crate) fn remove_entry<Q: ?Sized>(&mut self, key: &Q) -> Option<(K, V)>
function is_empty (line 79) | pub(crate) fn is_empty(&self) -> bool {
function entry (line 83) | pub(crate) fn entry(&mut self, key: K) -> Entry<'_, K, V> {
function get (line 92) | pub(crate) fn get<Q: ?Sized>(&self, k: &Q) -> Option<&V>
function get_mut (line 105) | pub(crate) fn get_mut<Q: ?Sized>(&mut self, k: &Q) -> Option<&mut V>
function keys (line 118) | pub(crate) fn keys(&self) -> std::slice::Iter<'_, K> {
function values (line 122) | pub(crate) fn values(&self) -> std::slice::Iter<'_, V> {
function iter (line 126) | pub(crate) fn iter(&self) -> Iter<'_, K, V> {
function iter_mut (line 133) | pub(crate) fn iter_mut(&mut self) -> IterMut<'_, K, V> {
method default (line 142) | fn default() -> Self {
type Entry (line 150) | pub(crate) enum Entry<'a, K, V> {
function or_insert (line 156) | pub(crate) fn or_insert(self, default: V) -> &'a mut V {
function or_insert_with (line 167) | pub(crate) fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a ...
type VacantEntry (line 179) | pub(crate) struct VacantEntry<'a, K, V> {
type OccupiedEntry (line 184) | pub(crate) struct OccupiedEntry<'a, K, V> {
type Iter (line 189) | pub(crate) struct Iter<'a, K, V> {
type Item (line 195) | type Item = (&'a K, &'a V);
method next (line 197) | fn next(&mut self) -> Option<(&'a K, &'a V)> {
method size_hint (line 206) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 212) | fn next_back(&mut self) -> Option<(&'a K, &'a V)> {
type IterMut (line 225) | pub(crate) struct IterMut<'a, K, V> {
type Item (line 231) | type Item = (&'a K, &'a mut V);
method next (line 233) | fn next(&mut self) -> Option<(&'a K, &'a mut V)> {
method size_hint (line 242) | fn size_hint(&self) -> (usize, Option<usize>) {
method next_back (line 248) | fn next_back(&mut self) -> Option<(&'a K, &'a mut V)> {
FILE: clap_builder/src/util/flat_set.rs
type FlatSet (line 9) | pub(crate) struct FlatSet<T> {
function new (line 14) | pub(crate) fn new() -> Self {
function insert (line 18) | pub(crate) fn insert(&mut self, value: T) -> bool {
function contains (line 28) | pub(crate) fn contains<Q: ?Sized>(&self, value: &Q) -> bool
function retain (line 41) | pub(crate) fn retain<F>(&mut self, f: F)
function is_empty (line 48) | pub(crate) fn is_empty(&self) -> bool {
function iter (line 52) | pub(crate) fn iter(&self) -> std::slice::Iter<'_, T> {
function sort_by_key (line 56) | pub(crate) fn sort_by_key<K, F>(&mut self, f: F)
function into_vec (line 64) | pub(crate) fn into_vec(self) -> Vec<T> {
method default (line 70) | fn default() -> Self {
type Item (line 78) | type Item = T;
type IntoIter (line 79) | type IntoIter = std::vec::IntoIter<T>;
method into_iter (line 81) | fn into_iter(self) -> Self::IntoIter {
type Item (line 87) | type Item = &'s T;
type IntoIter (line 88) | type IntoIter = std::slice::Iter<'s, T>;
method into_iter (line 90) | fn into_iter(self) -> Self::IntoIter {
function extend (line 96) | fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I) {
function from_iter (line 104) | fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self {
FILE: clap_builder/src/util/graph.rs
type Child (line 2) | struct Child<T> {
function new (line 8) | fn new(id: T) -> Self {
type ChildGraph (line 17) | pub(crate) struct ChildGraph<T>(Vec<Child<T>>);
function with_capacity (line 23) | pub(crate) fn with_capacity(s: usize) -> Self {
function insert (line 27) | pub(crate) fn insert(&mut self, req: T) -> usize {
function insert_child (line 35) | pub(crate) fn insert_child(&mut self, parent: usize, child: T) -> usize {
function iter (line 42) | pub(crate) fn iter(&self) -> impl Iterator<Item = &T> {
function contains (line 46) | pub(crate) fn contains(&self, req: &T) -> bool {
FILE: clap_builder/src/util/id.rs
type Id (line 11) | pub struct Id(Str);
constant HELP (line 14) | pub(crate) const HELP: &'static str = "help";
constant VERSION (line 15) | pub(crate) const VERSION: &'static str = "version";
constant EXTERNAL (line 16) | pub(crate) const EXTERNAL: &'static str = "";
method from_static_ref (line 18) | pub(crate) fn from_static_ref(name: &'static str) -> Self {
method as_str (line 23) | pub fn as_str(&self) -> &str {
method as_internal_str (line 27) | pub(crate) fn as_internal_str(&self) -> &Str {
method from (line 33) | fn from(id: &'_ Id) -> Self {
method from (line 39) | fn from(name: Str) -> Self {
method from (line 45) | fn from(name: &'_ Str) -> Self {
method from (line 52) | fn from(name: String) -> Self {
method from (line 59) | fn from(name: &'_ String) -> Self {
method from (line 65) | fn from(name: &'static str) -> Self {
method from (line 71) | fn from(name: &'_ &'static str) -> Self {
method from (line 84) | fn from(name: Cow<'static, str>) -> Self {
method fmt (line 97) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method fmt (line 104) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method as_ref (line 111) | fn as_ref(&self) -> &str {
method borrow (line 118) | fn borrow(&self) -> &str {
method eq (line 125) | fn eq(&self, other: &str) -> bool {
method eq (line 138) | fn eq(&self, other: &&str) -> bool {
method eq (line 151) | fn eq(&self, other: &Str) -> bool {
method eq (line 164) | fn eq(&self, other: &String) -> bool {
method from (line 77) | fn from(name: Id) -> Self {
method from (line 90) | fn from(name: Id) -> Self {
function eq (line 131) | fn eq(&self, other: &Id) -> bool {
function eq (line 144) | fn eq(&self, other: &Id) -> bool {
method eq (line 157) | fn eq(&self, other: &Id) -> bool {
method eq (line 170) | fn eq(&self, other: &Id) -> bool {
function from_cow_borrowed (line 182) | fn from_cow_borrowed() {
function from_cow_owned (line 190) | fn from_cow_owned() {
FILE: clap_builder/src/util/mod.rs
constant SUCCESS_CODE (line 26) | pub(crate) const SUCCESS_CODE: i32 = 0;
constant USAGE_CODE (line 32) | pub(crate) const USAGE_CODE: i32 = 2;
function eq_ignore_case (line 35) | pub(crate) fn eq_ignore_case(left: &str, right: &str) -> bool {
FILE: clap_builder/src/util/str_to_bool.rs
constant TRUE_LITERALS (line 2) | pub(crate) const TRUE_LITERALS: [&str; 6] = ["y", "yes", "t", "true", "o...
constant FALSE_LITERALS (line 5) | pub(crate) const FALSE_LITERALS: [&str; 6] = ["n", "no", "f", "false", "...
function str_to_bool (line 12) | pub(crate) fn str_to_bool(val: impl AsRef<str>) -> Option<bool> {
FILE: clap_complete/examples/completion-derive.rs
type Opt (line 23) | struct Opt {
type Commands (line 32) | enum Commands {
type ValueHintOpt (line 38) | struct ValueHintOpt {
function print_completions (line 69) | fn print_completions<G: Generator>(generator: G, cmd: &mut Command) {
function main (line 78) | fn main() {
FILE: clap_complete/examples/completion.rs
function build_cli (line 19) | fn build_cli() -> Command {
function print_completions (line 97) | fn print_completions<G: Generator>(generator: G, cmd: &mut Command) {
function main (line 106) | fn main() {
FILE: clap_complete/examples/dynamic.rs
function command (line 1) | fn command() -> clap::Command {
function main (line 18) | fn main() {
function verify_cli (line 27) | fn verify_cli() {
FILE: clap_complete/examples/exhaustive.rs
function main (line 4) | fn main() {
function print_completions (line 22) | fn print_completions<G: Generator>(generator: G, cmd: &mut clap::Command) {
constant EMPTY (line 31) | const EMPTY: [&str; 0] = [];
function cli (line 34) | fn cli() -> clap::Command {
FILE: clap_complete/src/aot/generator/mod.rs
type Generator (line 14) | pub trait Generator {
method file_name (line 38) | fn file_name(&self, name: &str) -> String;
method generate (line 70) | fn generate(&self, cmd: &Command, buf: &mut dyn Write);
method try_generate (line 99) | fn try_generate(&self, cmd: &Command, buf: &mut dyn Write) -> Result<(...
function generate_to (line 229) | pub fn generate_to<G, S, T>(
function generate (line 284) | pub fn generate<G, S>(generator: G, cmd: &mut Command, bin_name: S, buf:...
function _generate (line 293) | fn _generate<G: Generator>(generator: G, cmd: &mut Command, buf: &mut dy...
FILE: clap_complete/src/aot/generator/utils.rs
function all_subcommands (line 9) | pub fn all_subcommands(cmd: &Command) -> Vec<(String, String)> {
function find_subcommand_with_path (line 26) | pub fn find_subcommand_with_path<'cmd>(p: &'cmd Command, path: Vec<&str>...
function subcommands (line 40) | pub fn subcommands(p: &Command) -> Vec<(String, String)> {
function shorts_and_visible_aliases (line 70) | pub fn shorts_and_visible_aliases(p: &Command) -> Vec<char> {
function longs_and_visible_aliases (line 95) | pub fn longs_and_visible_aliases(p: &Command) -> Vec<String> {
function flags (line 125) | pub fn flags(p: &Command) -> Vec<Arg> {
function possible_values (line 134) | pub fn possible_values(a: &Arg) -> Option<Vec<clap::builder::PossibleVal...
function common_app (line 150) | fn common_app() -> Command {
function built (line 167) | fn built() -> Command {
function built_with_version (line 174) | fn built_with_version() -> Command {
function test_subcommands (line 182) | fn test_subcommands() {
function test_all_subcommands (line 196) | fn test_all_subcommands() {
function test_find_subcommand_with_path (line 218) | fn test_find_subcommand_with_path() {
function test_flags (line 226) | fn test_flags() {
function test_flag_subcommand (line 242) | fn test_flag_subcommand() {
function test_shorts (line 257) | fn test_shorts() {
function test_longs (line 274) | fn test_longs() {
FILE: clap_complete/src/aot/shells/bash.rs
type Bash (line 12) | pub struct Bash;
method file_name (line 15) | fn file_name(&self, name: &str) -> String {
method generate (line 19) | fn generate(&self, cmd: &Command, buf: &mut dyn Write) {
method try_generate (line 24) | fn try_generate(&self, cmd: &Command, buf: &mut dyn Write) -> Result<(),...
function all_subcommands (line 90) | fn all_subcommands(cmd: &Command, parent_fn_name: &str) -> String {
function subcommand_details (line 137) | fn subcommand_details(cmd: &Command) -> String {
function option_details_for_path (line 175) | fn option_details_for_path(cmd: &Command, path: &str) -> String {
function vals_for (line 259) | fn vals_for(o: &Arg) -> String {
function all_options_for_path (line 280) | fn all_options_for_path(cmd: &Command, path: &str) -> String {
FILE: clap_complete/src/aot/shells/elvish.rs
type Elvish (line 11) | pub struct Elvish;
method file_name (line 14) | fn file_name(&self, name: &str) -> String {
method generate (line 18) | fn generate(&self, cmd: &Command, buf: &mut dyn Write) {
method try_generate (line 23) | fn try_generate(&self, cmd: &Command, buf: &mut dyn Write) -> Result<(),...
function escape_string (line 60) | fn escape_string(string: &str) -> String {
function escape_help (line 64) | fn escape_help<T: ToString>(help: Option<&StyledStr>, data: T) -> String {
function generate_inner (line 71) | fn generate_inner(p: &Command, previous_command_name: &str) -> String {
FILE: clap_complete/src/aot/shells/fish.rs
type Fish (line 11) | pub struct Fish;
method file_name (line 14) | fn file_name(&self, name: &str) -> String {
method generate (line 18) | fn generate(&self, cmd: &Command, buf: &mut dyn Write) {
method try_generate (line 23) | fn try_generate(&self, cmd: &Command, buf: &mut dyn Write) -> Result<(),...
function escape_string (line 55) | fn escape_string(string: &str, escape_comma: bool) -> String {
function escape_help (line 64) | fn escape_help(help: &builder::StyledStr) -> String {
function escape_name (line 68) | fn escape_name(name: &str) -> String {
function gen_fish_inner (line 72) | fn gen_fish_inner(
function gen_subcommand_helpers (line 215) | fn gen_subcommand_helpers(
function value_completion (line 277) | fn value_completion(option: &Arg) -> String {
FILE: clap_complete/src/aot/shells/powershell.rs
type PowerShell (line 11) | pub struct PowerShell;
method file_name (line 14) | fn file_name(&self, name: &str) -> String {
method generate (line 18) | fn generate(&self, cmd: &Command, buf: &mut dyn Write) {
method try_generate (line 23) | fn try_generate(&self, cmd: &Command, buf: &mut dyn Write) -> Result<(),...
function escape_string (line 65) | fn escape_string(string: &str) -> String {
function escape_help (line 69) | fn escape_help<T: ToString>(help: Option<&StyledStr>, data: T) -> String {
function generate_inner (line 79) | fn generate_inner(p: &Command, previous_command_name: &str) -> String {
function generate_aliases (line 132) | fn generate_aliases(completions: &mut String, preamble: &String, arg: &A...
FILE: clap_complete/src/aot/shells/shell.rs
type Shell (line 15) | pub enum Shell {
method from_shell_path (line 112) | pub fn from_shell_path<P: AsRef<Path>>(path: P) -> Option<Shell> {
method from_env (line 138) | pub fn from_env() -> Option<Shell> {
method fmt (line 29) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Err (line 38) | type Err = String;
method from_str (line 40) | fn from_str(s: &str) -> Result<Self, Self::Err> {
method value_variants (line 52) | fn value_variants<'a>() -> &'a [Self] {
method to_possible_value (line 62) | fn to_possible_value(&self) -> Option<PossibleValue> {
method file_name (line 74) | fn file_name(&self, name: &str) -> String {
method generate (line 84) | fn generate(&self, cmd: &clap::Command, buf: &mut dyn std::io::Write) {
method try_generate (line 89) | fn try_generate(&self, cmd: &clap::Command, buf: &mut dyn std::io::Write...
function parse_shell_from_path (line 151) | fn parse_shell_from_path(path: &Path) -> Option<Shell> {
FILE: clap_complete/src/aot/shells/zsh.rs
type Zsh (line 10) | pub struct Zsh;
method file_name (line 13) | fn file_name(&self, name: &str) -> String {
method generate (line 17) | fn generate(&self, cmd: &Command, buf: &mut dyn Write) {
method try_generate (line 22) | fn try_generate(&self, cmd: &Command, buf: &mut dyn Write) -> Result<(),...
function subcommand_details (line 91) | fn subcommand_details(p: &Command) -> String {
function subcommands_of (line 154) | fn subcommands_of(p: &Command) -> String {
function get_subcommands_of (line 222) | fn get_subcommands_of(parent: &Command) -> String {
function parser_of (line 288) | fn parser_of<'cmd>(parent: &'cmd Command, bin_name: &str) -> Option<&'cm...
function get_args_of (line 324) | fn get_args_of(parent: &Command, p_global: Option<&Command>) -> String {
function value_completion (line 367) | fn value_completion(arg: &Arg) -> Option<String> {
function escape_help (line 430) | fn escape_help(string: &str) -> String {
function escape_value (line 443) | fn escape_value(string: &str) -> String {
function write_opts_of (line 457) | fn write_opts_of(p: &Command, p_global: Option<&Command>) -> String {
function arg_conflicts (line 508) | fn arg_conflicts(cmd: &Command, arg: &Arg, app_global: Option<&Command>)...
function write_flags_of (line 546) | fn write_flags_of(p: &Command, p_global: Option<&Command>) -> String {
function write_positionals_of (line 603) | fn write_positionals_of(p: &Command) -> String {
function test_escape_value (line 686) | fn test_escape_value() {
function test_escape_help (line 695) | fn test_escape_help() {
FILE: clap_complete/src/engine/candidate.rs
type CompletionCandidate (line 8) | pub struct CompletionCandidate {
method new (line 19) | pub fn new(value: impl Into<OsString>) -> Self {
method help (line 28) | pub fn help(mut self, help: Option<StyledStr>) -> Self {
method id (line 36) | pub fn id(mut self, id: Option<String>) -> Self {
method tag (line 44) | pub fn tag(mut self, tag: Option<StyledStr>) -> Self {
method display_order (line 50) | pub fn display_order(mut self, order: Option<usize>) -> Self {
method hide (line 58) | pub fn hide(mut self, hidden: bool) -> Self {
method add_prefix (line 67) | pub fn add_prefix(mut self, prefix: impl Into<OsString>) -> Self {
method get_value (line 79) | pub fn get_value(&self) -> &OsStr {
method get_help (line 84) | pub fn get_help(&self) -> Option<&StyledStr> {
method get_id (line 89) | pub fn get_id(&self) -> Option<&String> {
method get_tag (line 94) | pub fn get_tag(&self) -> Option<&StyledStr> {
method get_display_order (line 99) | pub fn get_display_order(&self) -> Option<usize> {
method is_hide_set (line 104) | pub fn is_hide_set(&self) -> bool {
method from (line 110) | fn from(s: S) -> Self {
FILE: clap_complete/src/engine/complete.rs
function complete (line 13) | pub fn complete(
type ParseState (line 124) | enum ParseState<'a> {
function complete_arg (line 135) | fn complete_arg(
function complete_option (line 228) | fn complete_option(
function complete_arg_value (line 326) | fn complete_arg_value(
function rsplit_delimiter (line 413) | fn rsplit_delimiter<'s, 'o>(
function complete_custom_arg_value (line 424) | fn complete_custom_arg_value(
function complete_subcommand (line 435) | fn complete_subcommand(value: &str, cmd: &clap::Command) -> Vec<Completi...
function complete_external_subcommand (line 458) | fn complete_external_subcommand(
function longs_and_visible_aliases (line 475) | fn longs_and_visible_aliases(p: &clap::Command) -> Vec<CompletionCandida...
function hidden_longs_aliases (line 491) | fn hidden_longs_aliases(p: &clap::Command) -> Vec<CompletionCandidate> {
function shorts_and_visible_aliases (line 508) | fn shorts_and_visible_aliases(p: &clap::Command) -> Vec<CompletionCandid...
function populate_arg_candidate (line 527) | fn populate_arg_candidate(candidate: CompletionCandidate, arg: &clap::Ar...
function possible_values (line 542) | fn possible_values(a: &clap::Arg) -> Option<Vec<clap::builder::PossibleV...
function subcommands (line 556) | fn subcommands(p: &clap::Command) -> Vec<CompletionCandidate> {
function populate_command_candidate (line 572) | fn populate_command_candidate(
function parse_shortflags (line 591) | fn parse_shortflags<'c, 's>(
function parse_positional (line 630) | fn parse_positional<'a>(
function parse_opt_value (line 681) | fn parse_opt_value(opt: &clap::Arg, count: usize) -> ParseState<'_> {
function pos_allows_hyphen (line 691) | fn pos_allows_hyphen(cmd: &clap::Command, pos_index: usize) -> bool {
function opt_allows_hyphen (line 698) | fn opt_allows_hyphen(state: &ParseState<'_>, arg: &clap_lex::ParsedArg<'...
FILE: clap_complete/src/engine/custom.rs
type ArgValueCompleter (line 44) | pub struct ArgValueCompleter(Arc<dyn ValueCompleter>);
method new (line 48) | pub fn new<C>(completer: C) -> Self
method complete (line 58) | pub fn complete(&self, current: &OsStr) -> Vec<CompletionCandidate> {
method fmt (line 64) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type ValueCompleter (line 74) | pub trait ValueCompleter: Send + Sync {
method complete (line 78) | fn complete(&self, current: &OsStr) -> Vec<CompletionCandidate>;
method complete (line 85) | fn complete(&self, current: &OsStr) -> Vec<CompletionCandidate> {
method complete (line 270) | fn complete(&self, current: &OsStr) -> Vec<CompletionCandidate> {
type ArgValueCandidates (line 108) | pub struct ArgValueCandidates(Arc<dyn ValueCandidates>);
method new (line 112) | pub fn new<C>(completer: C) -> Self
method candidates (line 122) | pub fn candidates(&self) -> Vec<CompletionCandidate> {
method fmt (line 128) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type SubcommandCandidates (line 152) | pub struct SubcommandCandidates(Arc<dyn ValueCandidates>);
method new (line 156) | pub fn new<C>(completer: C) -> Self
method candidates (line 166) | pub fn candidates(&self) -> Vec<CompletionCandidate> {
method fmt (line 172) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type ValueCandidates (line 184) | pub trait ValueCandidates: Send + Sync {
method candidates (line 188) | fn candidates(&self) -> Vec<CompletionCandidate>;
method candidates (line 195) | fn candidates(&self) -> Vec<CompletionCandidate> {
type PathCompleter (line 214) | pub struct PathCompleter {
method any (line 223) | pub fn any() -> Self {
method file (line 232) | pub fn file() -> Self {
method dir (line 237) | pub fn dir() -> Self {
method stdio (line 242) | pub fn stdio(mut self) -> Self {
method filter (line 248) | pub fn filter(
method current_dir (line 257) | pub fn current_dir(mut self, path: impl Into<std::path::PathBuf>) -> S...
method default (line 264) | fn default() -> Self {
function complete_path (line 285) | pub(crate) fn complete_path(
function is_hidden (line 362) | fn is_hidden(file_name: &OsStr) -> bool {
function split_file_name (line 366) | fn split_file_name(path: &std::path::Path) -> (&std::path::Path, &OsStr) {
function path_has_name (line 378) | fn path_has_name(path: &std::path::Path) -> bool {
FILE: clap_complete/src/env/mod.rs
type CompleteEnv (line 98) | pub struct CompleteEnv<'s, F> {
function with_factory (line 141) | pub fn with_factory(factory: F) -> Self {
function var (line 152) | pub fn var(mut self, var: &'static str) -> Self {
function bin (line 160) | pub fn bin(mut self, bin: impl Into<String>) -> Self {
function completer (line 168) | pub fn completer(mut self, completer: impl Into<String>) -> Self {
function shells (line 174) | pub fn shells(mut self, shells: Shells<'s>) -> Self {
function complete (line 185) | pub fn complete(self) {
function try_complete (line 202) | pub fn try_complete(
function try_complete_ (line 210) | fn try_complete_(
function shell (line 255) | fn shell(&self, name: &std::path::Path) -> Result<&dyn EnvCompleter, std...
function write_registration (line 278) | fn write_registration(
type Shells (line 311) | pub struct Shells<'s>(pub &'s [&'s dyn EnvCompleter]);
function builtins (line 315) | pub const fn builtins() -> Self {
function completer (line 320) | pub fn completer(&self, name: &str) -> Option<&dyn EnvCompleter> {
function names (line 325) | pub fn names(&self) -> impl Iterator<Item = &'static str> + 's {
function iter (line 330) | pub fn iter(&self) -> impl Iterator<Item = &dyn EnvCompleter> {
type EnvCompleter (line 342) | pub trait EnvCompleter {
method name (line 349) | fn name(&self) -> &'static str;
method is (line 354) | fn is(&self, name: &str) -> bool;
method write_registration (line 372) | fn write_registration(
method write_complete (line 386) | fn write_complete(
FILE: clap_complete/src/env/shells.rs
type Bash (line 8) | pub struct Bash;
method name (line 11) | fn name(&self) -> &'static str {
method is (line 14) | fn is(&self, name: &str) -> bool {
method write_registration (line 17) | fn write_registration(
method write_complete (line 72) | fn write_complete(
type CompType (line 106) | enum CompType {
type Err (line 121) | type Err = String;
method from_str (line 123) | fn from_str(s: &str) -> Result<Self, Self::Err> {
type Elvish (line 137) | pub struct Elvish;
method name (line 140) | fn name(&self) -> &'static str {
method is (line 143) | fn is(&self, name: &str) -> bool {
method write_registration (line 146) | fn write_registration(
method write_complete (line 173) | fn write_complete(
type Fish (line 199) | pub struct Fish;
method name (line 202) | fn name(&self) -> &'static str {
method is (line 205) | fn is(&self, name: &str) -> bool {
method write_registration (line 208) | fn write_registration(
method write_complete (line 225) | fn write_complete(
type Powershell (line 252) | pub struct Powershell;
method name (line 255) | fn name(&self) -> &'static str {
method is (line 258) | fn is(&self, name: &str) -> bool {
method write_registration (line 261) | fn write_registration(
method write_complete (line 317) | fn write_complete(
type Zsh (line 344) | pub struct Zsh;
method escape_value (line 453) | fn escape_value(string: &str) -> String {
method escape_help (line 458) | fn escape_help(string: &str) -> String {
method name (line 347) | fn name(&self) -> &'static str {
method is (line 350) | fn is(&self, name: &str) -> bool {
method write_registration (line 353) | fn write_registration(
method write_complete (line 410) | fn write_complete(
function fish_env_completer_path_quoting_works (line 472) | fn fish_env_completer_path_quoting_works() {
FILE: clap_complete/src/lib.rs
constant INTERNAL_ERROR_MSG (line 55) | const INTERNAL_ERROR_MSG: &str = "Fatal internal error. Please consider ...
type ReadmeDoctests (line 109) | pub struct ReadmeDoctests;
FILE: clap_complete/tests/examples.rs
function example_tests (line 2) | fn example_tests() {
FILE: clap_complete/tests/testsuite/bash.rs
constant CMD (line 8) | const CMD: &str = "bash";
type RuntimeBuilder (line 11) | type RuntimeBuilder = completest_pty::BashRuntimeBuilder;
function basic (line 14) | fn basic() {
function feature_sample (line 26) | fn feature_sample() {
function special_commands (line 38) | fn special_commands() {
function quoting (line 50) | fn quoting() {
function aliases (line 62) | fn aliases() {
function sub_subcommands (line 74) | fn sub_subcommands() {
function external_subcommands (line 86) | fn external_subcommands() {
function custom_bin_name (line 98) | fn custom_bin_name() {
function value_hint (line 111) | fn value_hint() {
function value_terminator (line 123) | fn value_terminator() {
function multi_value_option (line 135) | fn multi_value_option() {
function optional_value_option (line 147) | fn optional_value_option() {
function optional_multi_value_option (line 159) | fn optional_multi_value_option() {
function two_multi_valued_arguments (line 171) | fn two_multi_valued_arguments() {
function subcommand_last (line 183) | fn subcommand_last() {
function register_completion (line 197) | fn register_completion() {
function complete (line 204) | fn complete() {
function register_dynamic_env (line 332) | fn register_dynamic_env() {
function complete_dynamic_env_toplevel (line 339) | fn complete_dynamic_env_toplevel() {
function complete_dynamic_env_quoted_help (line 360) | fn complete_dynamic_env_quoted_help() {
function complete_dynamic_env_option_value (line 382) | fn complete_dynamic_env_option_value() {
function complete_dynamic_env_quoted_value (line 409) | fn complete_dynamic_env_quoted_value() {
function complete_dynamic_empty_subcommand (line 435) | fn complete_dynamic_empty_subcommand() {
function complete_dynamic_empty_option_value (line 452) | fn complete_dynamic_empty_option_value() {
function complete_dynamic_quoted_word (line 469) | fn complete_dynamic_quoted_word() {
function complete_dynamic_middle_of_word (line 487) | fn complete_dynamic_middle_of_word() {
function complete_dynamic_dir_no_trailing_space (line 524) | fn complete_dynamic_dir_no_trailing_space() {
FILE: clap_complete/tests/testsuite/common.rs
function basic_command (line 4) | pub(crate) fn basic_command(name: &'static str) -> clap::Command {
function feature_sample_command (line 29) | pub(crate) fn feature_sample_command(name: &'static str) -> clap::Command {
function special_commands_command (line 59) | pub(crate) fn special_commands_command(name: &'static str) -> clap::Comm...
function external_subcommand (line 78) | pub(crate) fn external_subcommand(name: &'static str) -> clap::Command {
function quoting_command (line 87) | pub(crate) fn quoting_command(name: &'static str) -> clap::Command {
function aliases_command (line 137) | pub(crate) fn aliases_command(name: &'static str) -> clap::Command {
function sub_subcommands_command (line 162) | pub(crate) fn sub_subcommands_command(name: &'static str) -> clap::Comma...
function value_hint_command (line 183) | pub(crate) fn value_hint_command(name: &'static str) -> clap::Command {
function value_terminator_command (line 267) | pub(crate) fn value_terminator_command(name: &'static str) -> clap::Comm...
function multi_value_option_command (line 276) | pub(crate) fn multi_value_option_command(name: &'static str) -> clap::Co...
function optional_value_option_command (line 285) | pub(crate) fn optional_value_option_command(name: &'static str) -> clap:...
function optional_multi_value_option_command (line 294) | pub(crate) fn optional_multi_value_option_command(name: &'static str) ->...
function two_multi_valued_arguments_command (line 303) | pub(crate) fn two_multi_valued_arguments_command(name: &'static str) -> ...
function subcommand_last (line 317) | pub(crate) fn subcommand_last(name: &'static str) -> clap::Command {
function assert_matches (line 323) | pub(crate) fn assert_matches(
function register_example (line 339) | pub(crate) fn register_example<R: completest::RuntimeBuilder>(context: &...
function load_runtime (line 393) | pub(crate) fn load_runtime<R: completest::RuntimeBuilder>(
type ScratchRuntime (line 437) | struct ScratchRuntime {
method home (line 444) | fn home(&self) -> &std::path::Path {
method register (line 448) | fn register(&mut self, name: &str, content: &str) -> std::io::Result<(...
method complete (line 452) | fn complete(&mut self, input: &str, term: &completest::Term) -> std::i...
function has_command (line 463) | pub(crate) fn has_command(command: &str) -> bool {
function is_ci (line 506) | fn is_ci() -> bool {
FILE: clap_complete/tests/testsuite/elvish.rs
constant CMD (line 7) | const CMD: &str = "elvish";
type RuntimeBuilder (line 10) | type RuntimeBuilder = completest_pty::ElvishRuntimeBuilder;
function basic (line 13) | fn basic() {
function feature_sample (line 25) | fn feature_sample() {
function special_commands (line 37) | fn special_commands() {
function quoting (line 49) | fn quoting() {
function aliases (line 61) | fn aliases() {
function sub_subcommands (line 73) | fn sub_subcommands() {
function external_subcommands (line 85) | fn external_subcommands() {
function custom_bin_name (line 97) | fn custom_bin_name() {
function value_hint (line 110) | fn value_hint() {
function value_terminator (line 122) | fn value_terminator() {
function multi_value_option (line 134) | fn multi_value_option() {
function optional_value_option (line 146) | fn optional_value_option() {
function optional_multi_value_option (line 158) | fn optional_multi_value_option() {
function two_multi_valued_arguments (line 170) | fn two_multi_valued_arguments() {
function subcommand_last (line 182) | fn subcommand_last() {
function register_completion (line 196) | fn register_completion() {
function complete (line 203) | fn complete() {
function register_dynamic_env (line 253) | fn register_dynamic_env() {
function complete_dynamic_env_toplevel (line 260) | fn complete_dynamic_env_toplevel() {
function complete_dynamic_env_quoted_help (line 282) | fn complete_dynamic_env_quoted_help() {
function complete_dynamic_env_option_value (line 305) | fn complete_dynamic_env_option_value() {
function complete_dynamic_env_quoted_value (line 335) | fn complete_dynamic_env_quoted_value() {
function complete_dynamic_empty_subcommand (line 365) | fn complete_dynamic_empty_subcommand() {
function complete_dynamic_empty_option_value (line 386) | fn complete_dynamic_empty_option_value() {
FILE: clap_complete/tests/testsuite/engine.rs
function suggest_subcommand_subset (line 24) | fn suggest_subcommand_subset() {
function suggest_hidden_long_flags (line 41) | fn suggest_hidden_long_flags() {
function suggest_hidden_subcommand_and_aliases (line 62) | fn suggest_hidden_subcommand_and_aliases() {
function suggest_subcommand_aliases (line 87) | fn suggest_subcommand_aliases() {
function suggest_hidden_possible_value (line 115) | fn suggest_hidden_possible_value() {
function suggest_hidden_long_flag_aliases (line 137) | fn suggest_hidden_long_flag_aliases() {
function suggest_long_flag_subset (line 169) | fn suggest_long_flag_subset() {
function suggest_possible_value_subset (line 198) | fn suggest_possible_value_subset() {
function suggest_additional_short_flags (line 216) | fn suggest_additional_short_flags() {
function suggest_subcommand_positional (line 246) | fn suggest_subcommand_positional() {
function suggest_subcommand_positional_after_escape (line 267) | fn suggest_subcommand_positional_after_escape() {
function suggest_argument_value (line 287) | fn suggest_argument_value() {
function suggest_argument_multi_values (line 382) | fn suggest_argument_multi_values() {
function suggest_value_hint_file_path (line 515) | fn suggest_value_hint_file_path() {
function suggest_value_path_file (line 567) | fn suggest_value_path_file() {
function suggest_value_path_dir (line 624) | fn suggest_value_path_dir() {
function suggest_value_hint_file_path_symlink_to_dir (line 676) | fn suggest_value_hint_file_path_symlink_to_dir() {
function suggest_value_hint_file_path_symlink_to_file (line 711) | fn suggest_value_hint_file_path_symlink_to_file() {
function suggest_value_hint_dir_path_symlink (line 739) | fn suggest_value_hint_dir_path_symlink() {
function suggest_value_hint_file_path_broken_symlink (line 770) | fn suggest_value_hint_file_path_broken_symlink() {
function suggest_value_hint_any_path_broken_symlink (line 796) | fn suggest_value_hint_any_path_broken_symlink() {
function suggest_custom_arg_value (line 824) | fn suggest_custom_arg_value() {
function suggest_custom_arg_completer (line 858) | fn suggest_custom_arg_completer() {
function suggest_multi_positional (line 901) | fn suggest_multi_positional() {
function suggest_multi_positional_unbounded (line 990) | fn suggest_multi_positional_unbounded() {
function suggest_delimiter_values (line 1072) | fn suggest_delimiter_values() {
function suggest_allow_hyphen (line 1225) | fn suggest_allow_hyphen() {
function suggest_positional_long_allow_hyphen (line 1271) | fn suggest_positional_long_allow_hyphen() {
function suggest_positional_short_allow_hyphen (line 1324) | fn suggest_positional_short_allow_hyphen() {
function suggest_external_subcommand (line 1368) | fn suggest_external_subcommand() {
function sort_and_filter (line 1392) | fn sort_and_filter() {
function complete (line 1446) | fn complete(cmd: &mut Command, args: impl AsRef<str>, current_dir: Optio...
FILE: clap_complete/tests/testsuite/fish.rs
constant CMD (line 7) | const CMD: &str = "fish";
type RuntimeBuilder (line 10) | type RuntimeBuilder = completest_pty::FishRuntimeBuilder;
function basic (line 13) | fn basic() {
function feature_sample (line 25) | fn feature_sample() {
function special_commands (line 37) | fn special_commands() {
function quoting (line 49) | fn quoting() {
function aliases (line 61) | fn aliases() {
function sub_subcommands (line 73) | fn sub_subcommands() {
function external_subcommands (line 85) | fn external_subcommands() {
function custom_bin_name (line 97) | fn custom_bin_name() {
function value_hint (line 110) | fn value_hint() {
function value_terminator (line 122) | fn value_terminator() {
function multi_value_option (line 134) | fn multi_value_option() {
function optional_value_option (line 146) | fn optional_value_option() {
function optional_multi_value_option (line 158) | fn optional_multi_value_option() {
function two_multi_valued_arguments (line 170) | fn two_multi_valued_arguments() {
function subcommand_last (line 182) | fn subcommand_last() {
function register_completion (line 196) | fn register_completion() {
function complete (line 203) | fn complete() {
function register_dynamic_env (line 246) | fn register_dynamic_env() {
function complete_dynamic_env_toplevel (line 253) | fn complete_dynamic_env_toplevel() {
function complete_dynamic_env_quoted_help (line 275) | fn complete_dynamic_env_quoted_help() {
function complete_dynamic_env_option_value (line 310) | fn complete_dynamic_env_option_value() {
function complete_dynamic_env_quoted_value (line 335) | fn complete_dynamic_env_quoted_value() {
function complete_dynamic_empty_subcommand (line 360) | fn complete_dynamic_empty_subcommand() {
function complete_dynamic_empty_option_value (line 377) | fn complete_dynamic_empty_option_value() {
FILE: clap_complete/tests/testsuite/general.rs
function infer_value_hint_for_path_buf (line 2) | fn infer_value_hint_for_path_buf() {
FILE: clap_complete/tests/testsuite/powershell.rs
function basic (line 4) | fn basic() {
function feature_sample (line 16) | fn feature_sample() {
function special_commands (line 28) | fn special_commands() {
function quoting (line 40) | fn quoting() {
function aliases (line 52) | fn aliases() {
function sub_subcommands (line 64) | fn sub_subcommands() {
function external_subcommands (line 76) | fn external_subcommands() {
function custom_bin_name (line 88) | fn custom_bin_name() {
function value_hint (line 101) | fn value_hint() {
function value_terminator (line 113) | fn value_terminator() {
function multi_value_option (line 125) | fn multi_value_option() {
function optional_value_option (line 137) | fn optional_value_option() {
function optional_multi_value_option (line 149) | fn optional_multi_value_option() {
function two_multi_valued_arguments (line 161) | fn two_multi_valued_arguments() {
function subcommand_last (line 173) | fn subcommand_last() {
FILE: clap_complete/tests/testsuite/zsh.rs
constant CMD (line 8) | const CMD: &str = "zsh";
type RuntimeBuilder (line 11) | type RuntimeBuilder = completest_pty::ZshRuntimeBuilder;
function basic (line 14) | fn basic() {
function feature_sample (line 26) | fn feature_sample() {
function special_commands (line 38) | fn special_commands() {
function quoting (line 50) | fn quoting() {
function aliases (line 62) | fn aliases() {
function sub_subcommands (line 74) | fn sub_subcommands() {
function external_subcommands (line 86) | fn external_subcommands() {
function custom_bin_name (line 98) | fn custom_bin_name() {
function value_hint (line 111) | fn value_hint() {
function value_terminator (line 123) | fn value_terminator() {
function multi_value_option (line 135) | fn multi_value_option() {
function optional_value_option (line 147) | fn optional_value_option() {
function optional_multi_value_option (line 159) | fn optional_multi_value_option() {
function two_multi_valued_arguments (line 171) | fn two_multi_valued_arguments() {
function subcommand_last (line 183) | fn subcommand_last() {
function register_completion (line 197) | fn register_completion() {
function complete (line 204) | fn complete() {
function register_dynamic_env (line 236) | fn register_dynamic_env() {
function complete_dynamic_env_toplevel (line 243) | fn complete_dynamic_env_toplevel() {
function complete_dynamic_env_quoted_help (line 267) | fn complete_dynamic_env_quoted_help() {
function complete_dynamic_env_option_value (line 296) | fn complete_dynamic_env_option_value() {
function complete_dynamic_env_quoted_value (line 321) | fn complete_dynamic_env_quoted_value() {
function complete_dynamic_empty_subcommand (line 349) | fn complete_dynamic_empty_subcommand() {
function complete_dynamic_empty_option_value (line 366) | fn complete_dynamic_empty_option_value() {
function complete_dynamic_empty_space (line 383) | fn complete_dynamic_empty_space() {
function complete_dynamic_dir_no_trailing_space (line 413) | fn complete_dynamic_dir_no_trailing_space() {
FILE: clap_complete_nushell/examples/nushell_completion.rs
function main (line 6) | fn main() {
FILE: clap_complete_nushell/examples/sub_subcommands.rs
function main (line 6) | fn main() {
FILE: clap_complete_nushell/examples/test.rs
function main (line 4) | fn main() {
function cli (line 14) | fn cli() -> clap::Command {
FILE: clap_complete_nushell/src/lib.rs
type Nushell (line 31) | pub struct Nushell;
method file_name (line 34) | fn file_name(&self, name: &str) -> String {
method generate (line 38) | fn generate(&self, cmd: &Command, buf: &mut dyn std::io::Write) {
method try_generate (line 43) | fn try_generate(
function append_value_completion_and_help (line 65) | fn append_value_completion_and_help(
function append_value_completion_defs (line 113) | fn append_value_completion_defs(arg: &Arg, name: &str, s: &mut String) {
function append_argument (line 134) | fn append_argument(arg: &Arg, name: &str, s: &mut String) {
function generate_completion (line 204) | fn generate_completion(completions: &mut String, cmd: &Command, is_subco...
function single_line_styled_str (line 244) | fn single_line_styled_str(text: &StyledStr) -> String {
type ReadmeDoctests (line 250) | pub struct ReadmeDoctests;
FILE: clap_complete_nushell/tests/common.rs
function basic_command (line 6) | pub(crate) fn basic_command(name: &'static str) -> Command {
function feature_sample_command (line 27) | pub(crate) fn feature_sample_command(name: &'static str) -> Command {
function special_commands_command (line 57) | pub(crate) fn special_commands_command(name: &'static str) -> Command {
function quoting_command (line 76) | pub(crate) fn quoting_command(name: &'static str) -> Command {
function aliases_command (line 125) | pub(crate) fn aliases_command(name: &'static str) -> Command {
function sub_subcommands_command (line 150) | pub(crate) fn sub_subcommands_command(name: &'static str) -> Command {
function positional_index_command (line 171) | pub(crate) fn positional_index_command(name: &'static str) -> Command {
function value_hint_command (line 194) | pub(crate) fn value_hint_command(name: &'static str) -> Command {
function assert_matches (line 270) | pub(crate) fn assert_matches(
function register_example (line 286) | pub(crate) fn register_example<R: completest::RuntimeBuilder>(context: &...
function load_runtime (line 335) | pub(crate) fn load_runtime<R: completest::RuntimeBuilder>(
type ScratchRuntime (line 371) | struct ScratchRuntime {
method home (line 378) | fn home(&self) -> &std::path::Path {
method register (line 382) | fn register(&mut self, name: &str, content: &str) -> std::io::Result<(...
method complete (line 386) | fn complete(&mut self, input: &str, term: &completest::Term) -> std::i...
function has_command (line 397) | pub(crate) fn has_command(command: &str) -> bool {
function is_ci (line 440) | fn is_ci() -> bool {
FILE: clap_complete_nushell/tests/completion.rs
function register_completion (line 8) | fn register_completion() {
function completion (line 13) | fn completion() {
function completion_value_hint (line 46) | fn completion_value_hint() {
FILE: clap_complete_nushell/tests/nushell.rs
function basic (line 4) | fn basic() {
function feature_sample (line 16) | fn feature_sample() {
function special_commands (line 28) | fn special_commands() {
function quoting (line 40) | fn quoting() {
function aliases (line 52) | fn aliases() {
function sub_subcommands (line 64) | fn sub_subcommands() {
function value_hint (line 76) | fn value_hint() {
function positional_index (line 88) | fn positional_index() {
FILE: clap_derive/src/attr.rs
type ClapAttr (line 16) | pub(crate) struct ClapAttr {
method parse_all (line 24) | pub(crate) fn parse_all(all_attrs: &[Attribute]) -> Result<Vec<Self>, ...
method value_or_abort (line 52) | pub(crate) fn value_or_abort(&self) -> Result<&AttrValue, syn::Error> {
method lit_str_or_abort (line 58) | pub(crate) fn lit_str_or_abort(&self) -> Result<&LitStr, syn::Error> {
method parse (line 74) | fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
type MagicAttrName (line 144) | pub(crate) enum MagicAttrName {
type AttrValue (line 174) | pub(crate) enum AttrValue {
method to_tokens (line 181) | fn to_tokens(&self, tokens: &mut TokenStream) {
type AttrKind (line 194) | pub(crate) enum AttrKind {
method as_str (line 204) | pub(crate) fn as_str(&self) -> &'static str {
FILE: clap_derive/src/derives/args.rs
function derive_args (line 25) | pub(crate) fn derive_args(input: &DeriveInput) -> Result<TokenStream, sy...
function gen_for_struct (line 58) | pub(crate) fn gen_for_struct(
function gen_augment (line 169) | pub(crate) fn gen_augment(
function gen_constructor (line 443) | pub(crate) fn gen_constructor(fields: &[(&Field, Item)]) -> Result<Token...
function gen_updater (line 554) | pub(crate) fn gen_updater(
function gen_parsers (line 660) | fn gen_parsers(
function raw_deprecated (line 765) | pub(crate) fn raw_deprecated() -> TokenStream {
function raw_deprecated (line 770) | pub(crate) fn raw_deprecated() -> TokenStream {
function collect_args_fields (line 777) | pub(crate) fn collect_args_fields<'a>(
FILE: clap_derive/src/derives/into_app.rs
function gen_for_struct (line 21) | pub(crate) fn gen_for_struct(
function gen_for_enum (line 69) | pub(crate) fn gen_for_enum(
FILE: clap_derive/src/derives/parser.rs
function derive_parser (line 29) | pub(crate) fn derive_parser(input: &DeriveInput) -> Result<TokenStream, ...
function gen_for_struct (line 77) | fn gen_for_struct(
function gen_for_enum (line 101) | fn gen_for_enum(
FILE: clap_derive/src/derives/subcommand.rs
function derive_subcommand (line 24) | pub(crate) fn derive_subcommand(input: &DeriveInput) -> Result<TokenStre...
function gen_for_enum (line 46) | pub(crate) fn gen_for_enum(
function gen_augment (line 138) | fn gen_augment(
function gen_has_subcommand (line 365) | fn gen_has_subcommand(variants: &[(&Variant, Item)]) -> Result<TokenStre...
function gen_from_arg_matches (line 429) | fn gen_from_arg_matches(variants: &[(&Variant, Item)]) -> Result<TokenSt...
function gen_update_from_arg_matches (line 575) | fn gen_update_from_arg_matches(variants: &[(&Variant, Item)]) -> Result<...
FILE: clap_derive/src/derives/value_enum.rs
function derive_value_enum (line 18) | pub(crate) fn derive_value_enum(input: &DeriveInput) -> Result<TokenStre...
function gen_for_enum (line 37) | pub(crate) fn gen_for_enum(
function lits (line 82) | fn lits(variants: &[(&Variant, Item)]) -> Result<Vec<(TokenStream, Ident...
function gen_value_variants (line 109) | fn gen_value_variants(lits: &[(TokenStream, Ident)]) -> TokenStream {
function gen_to_possible_value (line 119) | fn gen_to_possible_value(item: &Item, lits: &[(TokenStream, Ident)]) -> ...
FILE: clap_derive/src/dummies.rs
function parser (line 7) | pub(crate) fn parser(name: &Ident) -> proc_macro2::TokenStream {
function into_app (line 17) | pub(crate) fn into_app(name: &Ident) -> proc_macro2::TokenStream {
function from_arg_matches (line 32) | pub(crate) fn from_arg_matches(name: &Ident) -> proc_macro2::TokenStream {
function subcommand (line 47) | pub(crate) fn subcommand(name: &Ident) -> proc_macro2::TokenStream {
function args (line 67) | pub(crate) fn args(name: &Ident) -> proc_macro2::TokenStream {
function value_enum (line 84) | pub(crate) fn value_enum(name: &Ident) -> proc_macro2::TokenStream {
FILE: clap_derive/src/item.rs
constant DEFAULT_CASING (line 27) | pub(crate) const DEFAULT_CASING: CasingStyle = CasingStyle::Kebab;
constant DEFAULT_ENV_CASING (line 30) | pub(crate) const DEFAULT_ENV_CASING: CasingStyle = CasingStyle::Screamin...
type Item (line 33) | pub(crate) struct Item {
method from_args_struct (line 56) | pub(crate) fn from_args_struct(input: &DeriveInput, name: Name) -> Res...
method from_subcommand_enum (line 73) | pub(crate) fn from_subcommand_enum(
method from_value_enum (line 93) | pub(crate) fn from_value_enum(input: &DeriveInput, name: Name) -> Resu...
method from_subcommand_variant (line 119) | pub(crate) fn from_subcommand_variant(
method from_value_enum_variant (line 173) | pub(crate) fn from_value_enum_variant(
method from_args_field (line 199) | pub(crate) fn from_args_field(
method new (line 253) | fn new(
method push_method (line 285) | fn push_method(&mut self, kind: AttrKind, name: Ident, arg: impl ToTok...
method push_method_ (line 289) | fn push_method_(&mut self, kind: AttrKind, name: Ident, arg: TokenStre...
method infer_kind (line 348) | fn infer_kind(&mut self, attrs: &[ClapAttr]) -> Result<(), syn::Error> {
method push_attrs (line 419) | fn push_attrs(&mut self, attrs: &[ClapAttr]) -> Result<(), syn::Error> {
method push_doc_comment (line 897) | fn push_doc_comment(&mut self, attrs: &[Attribute], short_name: &str, ...
method set_kind (line 937) | fn set_kind(&mut self, kind: Sp<Kind>) -> Result<(), syn::Error> {
method find_default_method (line 960) | pub(crate) fn find_default_method(&self) -> Option<&Method> {
method initial_top_level_methods (line 967) | pub(crate) fn initial_top_level_methods(&self) -> TokenStream {
method final_top_level_methods (line 976) | pub(crate) fn final_top_level_methods(&self) -> TokenStream {
method field_methods (line 984) | pub(crate) fn field_methods(&self) -> TokenStream {
method group_id (line 990) | pub(crate) fn group_id(&self) -> &Name {
method group_methods (line 994) | pub(crate) fn group_methods(&self) -> TokenStream {
method deprecations (line 999) | pub(crate) fn deprecations(&self) -> TokenStream {
method next_display_order (line 1004) | pub(crate) fn next_display_order(&self) -> TokenStream {
method next_help_heading (line 1009) | pub(crate) fn next_help_heading(&self) -> TokenStream {
method id (line 1014) | pub(crate) fn id(&self) -> &Name {
method cased_name (line 1018) | pub(crate) fn cased_name(&self) -> TokenStream {
method value_name (line 1022) | pub(crate) fn value_name(&self) -> TokenStream {
method value_parser (line 1026) | pub(crate) fn value_parser(&self, field_type: &Type) -> Method {
method action (line 1049) | pub(crate) fn action(&self, field_type: &Type) -> Method {
method kind (line 1068) | pub(crate) fn kind(&self) -> Sp<Kind> {
method is_positional (line 1072) | pub(crate) fn is_positional(&self) -> bool {
method casing (line 1076) | pub(crate) fn casing(&self) -> Sp<CasingStyle> {
method env_casing (line 1080) | pub(crate) fn env_casing(&self) -> Sp<CasingStyle> {
method has_explicit_methods (line 1084) | pub(crate) fn has_explicit_methods(&self) -> bool {
method skip_group (line 1090) | pub(crate) fn skip_group(&self) -> bool {
type ValueParser (line 1096) | enum ValueParser {
method resolve (line 1102) | fn resolve(self, _inner_type: &Type) -> Method {
method span (line 1109) | fn span(&self) -> Span {
function default_value_parser (line 1117) | fn default_value_parser(inner_type: &Type, span: Span) -> Method {
type Action (line 1128) | pub(crate) enum Action {
method resolve (line 1134) | pub(crate) fn resolve(self, _field_type: &Type) -> Method {
method span (line 1141) | pub(crate) fn span(&self) -> Span {
function default_action (line 1149) | fn default_action(field_type: &Type, span: Span) -> Method {
type Kind (line 1181) | pub(crate) enum Kind {
method name (line 1193) | pub(crate) fn name(&self) -> &'static str {
method attr_kind (line 1206) | pub(crate) fn attr_kind(&self) -> AttrKind {
method ty (line 1219) | pub(crate) fn ty(&self) -> Option<&Sp<Ty>> {
type Method (line 1232) | pub(crate) struct Method {
method new (line 1238) | pub(crate) fn new(name: Ident, args: TokenStream) -> Self {
method from_env (line 1242) | fn from_env(ident: Ident, env_var: &str) -> Result<Option<Self>, syn::...
method args (line 1269) | pub(crate) fn args(&self) -> &TokenStream {
method to_tokens (line 1275) | fn to_tokens(&self, ts: &mut TokenStream) {
type Deprecation (line 1285) | pub(crate) struct Deprecation {
method attribute (line 1293) | fn attribute(version: &'static str, old: AttrKind, new: AttrKind, span...
method to_tokens (line 1308) | fn to_tokens(&self, ts: &mut TokenStream) {
function assert_attr_kind (line 1332) | fn assert_attr_kind(attr: &ClapAttr, possible_kind: &[AttrKind]) -> Resu...
function process_author_str (line 1355) | fn process_author_str(author: &str) -> String {
type CasingStyle (line 1378) | pub(crate) enum CasingStyle {
method from_lit (line 1398) | fn from_lit(name: &LitStr) -> Result<Sp<Self>, syn::Error> {
type Name (line 1422) | pub(crate) enum Name {
method translate (line 1428) | pub(crate) fn translate(self, style: CasingStyle) -> TokenStream {
method translate_char (line 1450) | pub(crate) fn translate_char(self, style: CasingStyle) -> TokenStream {
method to_tokens (line 1476) | fn to_tokens(&self, tokens: &mut TokenStream) {
FILE: clap_derive/src/lib.rs
function value_enum (line 38) | pub fn value_enum(input: TokenStream) -> TokenStream {
function parser (line 55) | pub fn parser(input: TokenStream) -> TokenStream {
function subcommand (line 87) | pub fn subcommand(input: TokenStream) -> TokenStream {
function args (line 99) | pub fn args(input: TokenStream) -> TokenStream {
function to_compile_error (line 109) | fn to_compile_error(
FILE: clap_derive/src/utils/doc_comments.rs
function extract_doc_comment (line 9) | pub(crate) fn extract_doc_comment(attrs: &[syn::Attribute]) -> Vec<Strin...
function format_doc_comment (line 53) | pub(crate) fn format_doc_comment(
function split_paragraphs (line 77) | fn split_paragraphs(lines: &[String]) -> Vec<String> {
function remove_period (line 102) | fn remove_period(mut s: String) -> String {
function is_blank (line 109) | fn is_blank(s: &str) -> bool {
function merge_lines (line 114) | fn merge_lines(lines: impl IntoIterator<Item = impl AsRef<str>>) -> Stri...
function parse_markdown (line 123) | fn parse_markdown(lines: &[String]) -> (String, Option<String>) {
type MarkdownWriter (line 144) | struct MarkdownWriter {
method newline (line 156) | fn newline(&mut self) {
method endline (line 161) | fn endline(&mut self) {
method new_paragraph (line 166) | fn new_paragraph(&mut self) {
method write_fmt (line 171) | fn write_fmt(&mut self, arguments: fmt::Arguments<'_>) {
method start_link (line 184) | fn start_link(&mut self, dest_url: pulldown_cmark::CowStr<'_>) {
method end_link (line 187) | fn end_link(&mut self) {
method start_style (line 191) | fn start_style(&mut self, style: Style) {
method end_style (line 195) | fn end_style(&mut self, style: Style) {
method reset (line 203) | fn reset(&mut self) {
method apply_styles (line 207) | fn apply_styles(&mut self) {
method remove_prefix (line 217) | fn remove_prefix(&mut self, quote_prefix: &str) {
method add_prefix (line 223) | fn add_prefix(&mut self, quote_prefix: &str) {
function parse_markdown (line 232) | pub(super) fn parse_markdown(input: &[String]) -> (String, Option<String...
FILE: clap_derive/src/utils/error.rs
type SpanError (line 1) | pub(crate) trait SpanError {
method EXPECTED_Span_OR_ToTokens (line 3) | fn EXPECTED_Span_OR_ToTokens<D: std::fmt::Display>(&self, msg: D) -> s...
method EXPECTED_Span_OR_ToTokens (line 19) | fn EXPECTED_Span_OR_ToTokens<D: std::fmt::Display>(&self, msg: D) -> s...
type ToTokensError (line 6) | pub(crate) trait ToTokensError {
method EXPECTED_Span_OR_ToTokens (line 8) | fn EXPECTED_Span_OR_ToTokens<D: std::fmt::Display>(&self, msg: D) -> s...
method EXPECTED_Span_OR_ToTokens (line 12) | fn EXPECTED_Span_OR_ToTokens<D: std::fmt::Display>(&self, msg: D) -> s...
FILE: clap_derive/src/utils/spanned.rs
type Sp (line 9) | pub(crate) struct Sp<T> {
function new (line 15) | pub(crate) fn new(val: T, span: Span) -> Self {
function get (line 19) | pub(crate) fn get(&self) -> &T {
function span (line 23) | pub(crate) fn span(&self) -> Span {
type Target (line 29) | type Target = T;
method deref (line 31) | fn deref(&self) -> &T {
method deref_mut (line 37) | fn deref_mut(&mut self) -> &mut T {
function from (line 43) | fn from(ident: Ident) -> Self {
function from (line 52) | fn from(lit: LitStr) -> Self {
function from (line 61) | fn from(sp: Sp<&'a str>) -> Self {
function eq (line 67) | fn eq(&self, other: &U) -> bool {
function as_ref (line 73) | fn as_ref(&self) -> &str {
method to_tokens (line 79) | fn to_tokens(&self, stream: &mut TokenStream) {
FILE: clap_derive/src/utils/ty.rs
type Ty (line 11) | pub(crate) enum Ty {
method from_syn_ty (line 23) | pub(crate) fn from_syn_ty(ty: &Type) -> Sp<Self> {
method as_str (line 44) | pub(crate) fn as_str(&self) -> &'static str {
function inner_type (line 58) | pub(crate) fn inner_type(field_ty: &Type) -> &Type {
function sub_type (line 73) | pub(crate) fn sub_type(ty: &Type) -> Option<&Type> {
function only_last_segment (line 77) | fn only_last_segment(mut ty: &Type) -> Option<&PathSegment> {
function subty_if (line 95) | fn subty_if<F>(ty: &Type, f: F) -> Option<&Type>
function subty_if_name (line 116) | pub(crate) fn subty_if_name<'a>(ty: &'a Type, name: &str) -> Option<&'a ...
function is_simple_ty (line 120) | pub(crate) fn is_simple_ty(ty: &Type, name: &str) -> bool {
function is_generic_ty (line 132) | fn is_generic_ty(ty: &Type, name: &str) -> bool {
function is_unit_ty (line 136) | fn is_unit_ty(ty: &Type) -> bool {
function only_one (line 144) | fn only_one<I, T>(mut iter: I) -> Option<T>
function get_vec_ty (line 152) | fn get_vec_ty(ty: &Type, vec_ty: Ty, vecvec_ty: Ty) -> Option<Ty> {
function get_vec_ty (line 163) | fn get_vec_ty(ty: &Type, vec_ty: Ty, _vecvec_ty: Ty) -> Option<Ty> {
FILE: clap_lex/src/ext.rs
type OsStrExt (line 4) | pub trait OsStrExt: private::Sealed {
method try_str (line 9) | fn try_str(&self) -> Result<&str, std::str::Utf8Error>;
method contains (line 24) | fn contains(&self, needle: &str) -> bool;
method find (line 49) | fn find(&self, needle: &str) -> Option<usize>;
method strip_prefix (line 66) | fn strip_prefix(&self, prefix: &str) -> Option<&OsStr>;
method starts_with (line 81) | fn starts_with(&self, prefix: &str) -> bool;
method split (line 168) | fn split<'s, 'n>(&'s self, needle: &'n str) -> Split<'s, 'n>;
method split_once (line 182) | fn split_once(&self, needle: &'_ str) -> Option<(&OsStr, &OsStr)>;
method try_str (line 186) | fn try_str(&self) -> Result<&str, std::str::Utf8Error> {
method contains (line 191) | fn contains(&self, needle: &str) -> bool {
method find (line 195) | fn find(&self, needle: &str) -> Option<usize> {
method strip_prefix (line 201) | fn strip_prefix(&self, prefix: &str) -> Option<&OsStr> {
method starts_with (line 210) | fn starts_with(&self, prefix: &str) -> bool {
method split (line 215) | fn split<'s, 'n>(&'s self, needle: &'n str) -> Split<'s, 'n> {
method split_once (line 223) | fn split_once(&self, needle: &'_ str) -> Option<(&OsStr, &OsStr)> {
type Sealed (line 242) | pub trait Sealed {}
type Split (line 247) | pub struct Split<'s, 'n> {
type Item (line 253) | type Item = &'s OsStr;
method next (line 255) | fn next(&mut self) -> Option<Self::Item> {
function split_at (line 275) | pub(crate) unsafe fn split_at(os: &OsStr, index: usize) -> (&OsStr, &OsS...
FILE: clap_lex/src/lib.rs
type RawArgs (line 129) | pub struct RawArgs {
method from_args (line 153) | pub fn from_args() -> Self {
method new (line 170) | pub fn new(iter: impl IntoIterator<Item = impl Into<OsString>>) -> Self {
method cursor (line 188) | pub fn cursor(&self) -> ArgCursor {
method next (line 193) | pub fn next<'s>(&'s self, cursor: &mut ArgCursor) -> Option<ParsedArg<...
method next_os (line 198) | pub fn next_os<'s>(&'s self, cursor: &mut ArgCursor) -> Option<&'s OsS...
method peek (line 205) | pub fn peek<'s>(&'s self, cursor: &ArgCursor) -> Option<ParsedArg<'s>> {
method peek_os (line 210) | pub fn peek_os<'s>(&'s self, cursor: &ArgCursor) -> Option<&'s OsStr> {
method remaining (line 227) | pub fn remaining<'s>(&'s self, cursor: &mut ArgCursor) -> impl Iterato...
method seek (line 234) | pub fn seek(&self, cursor: &mut ArgCursor, pos: SeekFrom) {
method insert (line 245) | pub fn insert(
method is_end (line 257) | pub fn is_end(&self, cursor: &ArgCursor) -> bool {
method from (line 267) | fn from(val: I) -> Self {
type ArgCursor (line 276) | pub struct ArgCursor {
method new (line 281) | fn new() -> Self {
type ParsedArg (line 288) | pub struct ParsedArg<'s> {
function new (line 293) | fn new(inner: &'s OsStr) -> Self {
function is_empty (line 298) | pub fn is_empty(&self) -> bool {
function is_stdio (line 303) | pub fn is_stdio(&self) -> bool {
function is_escape (line 308) | pub fn is_escape(&self) -> bool {
function is_negative_number (line 316) | pub fn is_negative_number(&self) -> bool {
function to_long (line 324) | pub fn to_long(&self) -> Option<(Result<&'s str, &'s OsStr>, Option<&'s ...
function is_long (line 342) | pub fn is_long(&self) -> bool {
function to_short (line 347) | pub fn to_short(&self) -> Option<ShortFlags<'s>> {
function is_short (line 363) | pub fn is_short(&self) -> bool {
function to_value_os (line 374) | pub fn to_value_os(&self) -> &'s OsStr {
function to_value (line 385) | pub fn to_value(&self) -> Result<&'s str, &'s OsStr> {
function display (line 392) | pub fn display(&self) -> impl std::fmt::Display + 's {
type ShortFlags (line 399) | pub struct ShortFlags<'s> {
function new (line 406) | fn new(inner: &'s OsStr) -> Self {
function advance_by (line 417) | pub fn advance_by(&mut self, n: usize) -> Result<(), usize> {
function is_empty (line 425) | pub fn is_empty(&self) -> bool {
function is_negative_number (line 432) | pub fn is_negative_number(&self) -> bool {
function next_flag (line 439) | pub fn next_flag(&mut self) -> Option<Result<char, &'s OsStr>> {
function next_value_os (line 453) | pub fn next_value_os(&mut self) -> Option<&'s OsStr> {
type Item (line 472) | type Item = Result<char, &'s OsStr>;
method next (line 474) | fn next(&mut self) -> Option<Self::Item> {
function split_nonutf8_once (line 479) | fn split_nonutf8_once(b: &OsStr) -> (&str, Option<&OsStr>) {
function is_number (line 492) | fn is_number(arg: &str) -> bool {
type ReadmeDoctests (line 526) | pub struct ReadmeDoctests;
FILE: clap_lex/tests/testsuite/lexer.rs
function insert (line 2) | fn insert() {
function zero_copy_parsing (line 24) | fn zero_copy_parsing() {
FILE: clap_lex/tests/testsuite/parsed.rs
function to_long_stdio (line 6) | fn to_long_stdio() {
function to_long_no_escape (line 18) | fn to_long_no_escape() {
function to_long_no_value (line 30) | fn to_long_no_value() {
function to_long_with_empty_value (line 44) | fn to_long_with_empty_value() {
function to_long_with_value (line 58) | fn to_long_with_value() {
function to_short_stdio (line 72) | fn to_short_stdio() {
function to_short_escape (line 84) | fn to_short_escape() {
function to_short_long (line 96) | fn to_short_long() {
function to_short (line 108) | fn to_short() {
function is_negative_number (line 122) | fn is_negative_number() {
function is_positive_number (line 134) | fn is_positive_number() {
function is_not_number (line 144) | fn is_not_number() {
function is_stdio (line 161) | fn is_stdio() {
function is_not_stdio (line 171) | fn is_not_stdio() {
function is_escape (line 181) | fn is_escape() {
function is_not_escape (line 191) | fn is_not_escape() {
FILE: clap_lex/tests/testsuite/shorts.rs
function iter (line 2) | fn iter() {
function next_flag (line 14) | fn next_flag() {
function next_value_os (line 33) | fn next_value_os() {
function next_flag_with_value (line 46) | fn next_flag_with_value() {
function next_flag_with_no_value (line 60) | fn next_flag_with_no_value() {
function advance_by_nothing (line 77) | fn advance_by_nothing() {
function advance_by_something (line 91) | fn advance_by_something() {
function advance_by_out_of_bounds (line 105) | fn advance_by_out_of_bounds() {
function is_not_empty (line 119) | fn is_not_empty() {
function is_partial_not_empty (line 130) | fn is_partial_not_empty() {
function is_exhausted_empty (line 142) | fn is_exhausted_empty() {
function is_negative_number (line 154) | fn is_negative_number() {
function is_not_negaitve_number (line 165) | fn is_not_negaitve_number() {
FILE: clap_mangen/examples/man.rs
function main (line 7) | fn main() -> Result<(), io::Error> {
FILE: clap_mangen/src/lib.rs
type Man (line 18) | pub struct Man {
method new (line 30) | pub fn new(mut cmd: clap::Command) -> Self {
method title (line 55) | pub fn title(mut self, title: impl Into<String>) -> Self {
method section (line 72) | pub fn section(mut self, section: impl Into<String>) -> Self {
method date (line 80) | pub fn date(mut self, date: impl Into<String>) -> Self {
method source (line 88) | pub fn source(mut self, source: impl Into<String>) -> Self {
method manual (line 94) | pub fn manual(mut self, manual: impl Into<String>) -> Self {
method get_filename (line 104) | pub fn get_filename(&self) -> String {
method generate_to (line 115) | pub fn generate_to(
method render (line 151) | pub fn render(&self, w: &mut dyn Write) -> Result<(), std::io::Error> {
method render_title (line 182) | pub fn render_title(&self, w: &mut dyn Write) -> Result<(), std::io::E...
method _render_title (line 188) | fn _render_title(&self, roff: &mut Roff) {
method title_args (line 193) | fn title_args(&self) -> Vec<&str> {
method render_name_section (line 204) | pub fn render_name_section(&self, w: &mut dyn Write) -> Result<(), std...
method _render_name_section (line 210) | fn _render_name_section(&self, roff: &mut Roff) {
method render_synopsis_section (line 216) | pub fn render_synopsis_section(&self, w: &mut dyn Write) -> Result<(),...
method _render_synopsis_section (line 222) | fn _render_synopsis_section(&self, roff: &mut Roff) {
method render_description_section (line 228) | pub fn render_description_section(&self, w: &mut dyn Write) -> Result<...
method _render_description_section (line 234) | fn _render_description_section(&self, roff: &mut Roff) {
method render_options_section (line 240) | pub fn render_options_section(&self, w: &mut dyn Write) -> Result<(), ...
method _render_options_section (line 246) | fn _render_options_section(&self, roff: &mut Roff) {
method render_subcommands_section (line 283) | pub fn render_subcommands_section(&self, w: &mut dyn Write) -> Result<...
method _render_subcommands_section (line 289) | fn _render_subcommands_section(&self, roff: &mut Roff) {
method render_extra_section (line 296) | pub fn render_extra_section(&self, w: &mut dyn Write) -> Result<(), st...
method _render_extra_section (line 302) | fn _render_extra_section(&self, roff: &mut Roff) {
method render_version_section (line 308) | pub fn render_version_section(&self, w: &mut dyn Write) -> Result<(), ...
method _render_version_section (line 314) | fn _render_version_section(&self, roff: &mut Roff) {
method render_authors_section (line 321) | pub fn render_authors_section(&self, w: &mut dyn Write) -> Result<(), ...
method _render_authors_section (line 327) | fn _render_authors_section(&self, roff: &mut Roff) {
function generate_to (line 128) | pub fn generate_to(
function app_has_version (line 335) | fn app_has_version(cmd: &clap::Command) -> bool {
function app_has_arguments (line 342) | fn app_has_arguments(cmd: &clap::Command) -> bool {
function app_has_subcommands (line 347) | fn app_has_subcommands(cmd: &clap::Command) -> bool {
type ReadmeDoctests (line 353) | pub struct ReadmeDoctests;
FILE: clap_mangen/src/render.rs
function subcommand_heading (line 4) | pub(crate) fn subcommand_heading(cmd: &clap::Command) -> &str {
function about (line 11) | pub(crate) fn about(roff: &mut Roff, cmd: &clap::Command) {
function description (line 20) | pub(crate) fn description(roff: &mut Roff, cmd: &clap::Command) {
function synopsis (line 32) | pub(crate) fn synopsis(roff: &mut Roff, cmd: &clap::Command) {
function options (line 95) | pub(crate) fn options(roff: &mut Roff, items: &[&Arg]) {
function possible_options (line 195) | fn possible_options(roff: &mut Roff, arg: &Arg, arg_help_written: bool) {
function subcommands (line 215) | pub(crate) fn subcommands(roff: &mut Roff, cmd: &clap::Command, section:...
function version (line 238) | pub(crate) fn version(cmd: &clap::Command) -> String {
function after_help (line 247) | pub(crate) fn after_help(roff: &mut Roff, cmd: &clap::Command) {
function subcommand_markers (line 255) | fn subcommand_markers(cmd: &clap::Command) -> (&'static str, &'static st...
function option_markers (line 259) | fn option_markers(opt: &Arg) -> (&'static str, &'static str) {
function markers (line 263) | fn markers(required: bool) -> (&'static str, &'static str) {
function option_value_markers (line 267) | fn option_value_markers(arg: &Arg) -> (&'static str, &'static str) {
function short_option
Condensed preview — 597 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,533K chars).
[
{
"path": ".cargo/config.toml",
"chars": 51,
"preview": "[resolver]\nincompatible-rust-versions = \"fallback\"\n"
},
{
"path": ".clippy.toml",
"chars": 797,
"preview": "allow-print-in-tests = true\nallow-expect-in-tests = true\nallow-unwrap-in-tests = true\nallow-dbg-in-tests = true\ndisallow"
},
{
"path": ".github/FUNDING.yml",
"chars": 38,
"preview": "github: clap-rs\nopen_collective: clap\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.yml",
"chars": 2256,
"preview": "name: Bug report\ndescription: An issue with clap, clap_complete, clap_derive, or clap_mangen\nlabels: [\"C-bug\", \"S-triage"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 164,
"preview": "blank_issues_enabled: true\ncontact_links:\n - name: Ask a question\n about: For support or brainstorming\n url: http"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.yml",
"chars": 1764,
"preview": "name: Feature request\ndescription: Suggest an idea for this project\nlabels: [\"C-enhancement\", \"S-triage\"]\nbody:\n - type"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 277,
"preview": "<!--\nThanks for helping out!\n\nPlease link the appropriate issue from your PR.\n\nIf you don't have an issue, we'd recommen"
},
{
"path": ".github/renovate.json5",
"chars": 3244,
"preview": "{\n schedule: [\n 'before 5am on the first day of the month',\n ],\n semanticCommits: 'enabled',\n commitMessageLowerC"
},
{
"path": ".github/settings.yml",
"chars": 4324,
"preview": "# These settings are synced to GitHub by https://probot.github.io/apps/settings/\n\nrepository:\n description: \"A full fea"
},
{
"path": ".github/workflows/audit.yml",
"chars": 1227,
"preview": "name: Security audit\n\npermissions:\n contents: read\n\non:\n pull_request:\n paths:\n - '**/Cargo.toml'\n - '**/"
},
{
"path": ".github/workflows/bench-baseline.yml",
"chars": 1146,
"preview": "name: Benchmark Baseline\n\npermissions:\n contents: read\n\non:\n push:\n branches: master\n\njobs:\n bench:\n name: Bina"
},
{
"path": ".github/workflows/ci.yml",
"chars": 7515,
"preview": "name: CI\n\npermissions:\n contents: read\n\non:\n pull_request:\n push:\n branches:\n - \"*master\"\n\nenv:\n RUST_BACKTR"
},
{
"path": ".github/workflows/committed.yml",
"chars": 595,
"preview": "# Not run as part of pre-commit checks because they don't handle sending the correct commit\n# range to `committed`\nname:"
},
{
"path": ".github/workflows/post-release.yml",
"chars": 1369,
"preview": "name: post-release\non:\n push:\n tags:\n - \"v*\"\npermissions:\n contents: read\n\njobs:\n create-release:\n permissio"
},
{
"path": ".github/workflows/pre-commit.yml",
"chars": 457,
"preview": "name: pre-commit\n\npermissions: {} # none\n\non:\n pull_request:\n push:\n branches: [master]\n\nenv:\n RUST_BACKTRACE: 1\n "
},
{
"path": ".github/workflows/release-notes.py",
"chars": 1029,
"preview": "#!/usr/bin/env python3\n\nimport argparse\nimport re\nimport pathlib\nimport sys\n\n\n_STDIO = pathlib.Path(\"-\")\n\n\ndef main():\n "
},
{
"path": ".github/workflows/rust-next.yml",
"chars": 3377,
"preview": "name: rust-next\n\npermissions:\n contents: read\n\non:\n schedule:\n - cron: '3 3 3 * *'\n\nenv:\n RUST_BACKTRACE: 1\n CARGO_"
},
{
"path": ".github/workflows/spelling.yml",
"chars": 451,
"preview": "name: Spelling\n\npermissions:\n contents: read\n\non: [pull_request]\n\nenv:\n RUST_BACKTRACE: 1\n CARGO_TERM_COLOR: always\n "
},
{
"path": ".github/workflows/template.yml",
"chars": 1661,
"preview": "name: Template Update\n\npermissions:\n contents: read\n\non:\n schedule:\n - cron: '1 1 1 * *'\n workflow_dispatch:\n\nenv:\n "
},
{
"path": ".gitignore",
"chars": 7,
"preview": "target\n"
},
{
"path": ".pre-commit-config.yaml",
"chars": 541,
"preview": "exclude: |\n (?x)^(\n tests/.*|\n CHANGELOG.md\n )$\ndefault_install_hook_types: [\"pre-commit\", \"commit-msg\"]\nrepos:\n"
},
{
"path": "CHANGELOG.md",
"chars": 233650,
"preview": "# Change Log\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Change"
},
{
"path": "CITATION.cff",
"chars": 531,
"preview": "# Parser settings.\ncff-version: 1.2.0\nmessage: Please cite this crate using these information.\n\n# Version information.\nd"
},
{
"path": "CONTRIBUTING.md",
"chars": 9590,
"preview": "# How to Contribute\n\nContributions are always welcome! And there is a multitude of ways in which you can help depending "
},
{
"path": "Cargo.toml",
"chars": 14088,
"preview": "[workspace]\nresolver = \"2\"\nmembers = [\n \"clap_bench\",\n \"clap_builder\",\n \"clap_derive\",\n \"clap_lex\",\n \"clap_complete"
},
{
"path": "LICENSE-APACHE",
"chars": 11358,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "LICENSE-MIT",
"chars": 1062,
"preview": "Copyright (c) Individual contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof t"
},
{
"path": "Makefile",
"chars": 1481,
"preview": "# CI Steps\n#\n# Considerations\n# - Easy to debug: show the command being run\n# - Leverage CI features: Only run individua"
},
{
"path": "README.md",
"chars": 1827,
"preview": "# clap\n\n> **Command Line Argument Parser for Rust**\n\n[] // needed for divan\n\nuse clap::{ArgMatches, Command, arg};\n\nmacro_rules! create_app"
},
{
"path": "clap_bench/benches/empty.rs",
"chars": 606,
"preview": "#![allow(elided_lifetimes_in_paths)] // needed for divan\n\nuse clap::ArgMatches;\nuse clap::Command;\n\nmacro_rules! create_"
},
{
"path": "clap_bench/benches/ripgrep.rs",
"chars": 43087,
"preview": "//! Used to simulate a fairly large number of options/flags and parsing with thousands of positional\n//! args\n//!\n//! CL"
},
{
"path": "clap_bench/benches/rustup.rs",
"chars": 17651,
"preview": "//! Used to simulate a fairly large number of subcommands\n//!\n//! CLI used is from rustup 408ed84f0e50511ed44a405dd91365"
},
{
"path": "clap_bench/benches/simple.rs",
"chars": 1243,
"preview": "#![allow(elided_lifetimes_in_paths)] // needed for divan\n\nuse clap::{ArgMatches, Command, arg};\n\nmacro_rules! create_app"
},
{
"path": "clap_bench/src/lib.rs",
"chars": 125,
"preview": "#![cfg_attr(docsrs, feature(doc_cfg))]\n#![forbid(unsafe_code)]\n#![warn(clippy::print_stderr)]\n#. This will contain `clap_builder` specific"
},
{
"path": "clap_builder/Cargo.toml",
"chars": 2267,
"preview": "[package]\nname = \"clap_builder\"\nversion = \"4.6.0\"\ndescription = \"A simple to use, efficient, and full-featured Command L"
},
{
"path": "clap_builder/README.md",
"chars": 798,
"preview": "# `clap_builder`\n\nBuilder implementation for clap.\n\n[docs.rs](https://docs.rs/clap)\n- [Derive Tutorial](https://docs.rs/"
},
{
"path": "clap_builder/src/builder/action.rs",
"chars": 15568,
"preview": "#[cfg(debug_assertions)]\nuse crate::util::AnyValueId;\n\nuse crate::builder::ValueRange;\n\n/// Behavior of arguments when t"
},
{
"path": "clap_builder/src/builder/app_settings.rs",
"chars": 1922,
"preview": "#[allow(unused)]\nuse crate::Arg;\n#[allow(unused)]\nuse crate::Command;\n\n#[derive(Default, Copy, Clone, Debug, PartialEq, "
},
{
"path": "clap_builder/src/builder/arg.rs",
"chars": 171388,
"preview": "// Std\n#[cfg(feature = \"env\")]\nuse std::env;\n#[cfg(feature = \"env\")]\nuse std::ffi::OsString;\nuse std::{\n cmp::{Ord, O"
},
{
"path": "clap_builder/src/builder/arg_group.rs",
"chars": 21090,
"preview": "// Internal\nuse crate::builder::IntoResettable;\nuse crate::util::Id;\n\n/// Specifies a logical group of [arguments]\n///\n/"
},
{
"path": "clap_builder/src/builder/arg_predicate.rs",
"chars": 537,
"preview": "use crate::builder::OsStr;\n\n/// Operations to perform on argument values\n///\n/// These do not apply to [`ValueSource::De"
},
{
"path": "clap_builder/src/builder/arg_settings.rs",
"chars": 2104,
"preview": "#[allow(unused)]\nuse crate::Arg;\n\n#[derive(Default, Copy, Clone, Debug, PartialEq, Eq)]\npub(crate) struct ArgFlags(u32);"
},
{
"path": "clap_builder/src/builder/command.rs",
"chars": 180657,
"preview": "#![cfg_attr(not(feature = \"usage\"), allow(unused_mut))]\n\n// Std\nuse std::env;\nuse std::ffi::OsString;\nuse std::fmt;\nuse "
},
{
"path": "clap_builder/src/builder/debug_asserts.rs",
"chars": 28729,
"preview": "use std::cmp::Ordering;\n\nuse crate::ArgAction;\nuse crate::INTERNAL_ERROR_MSG;\nuse crate::builder::ValueRange;\nuse crate:"
},
{
"path": "clap_builder/src/builder/ext.rs",
"chars": 1410,
"preview": "use crate::util::AnyValue;\nuse crate::util::AnyValueId;\nuse crate::util::FlatMap;\n\n#[derive(Default, Clone, Debug)]\npub("
},
{
"path": "clap_builder/src/builder/mod.rs",
"chars": 1921,
"preview": "//! Define [`Command`] line [arguments][`Arg`]\n\nmod action;\nmod app_settings;\nmod arg;\nmod arg_group;\nmod arg_predicate;"
},
{
"path": "clap_builder/src/builder/os_str.rs",
"chars": 8469,
"preview": "use crate::builder::Str;\n#[cfg(feature = \"string\")]\nuse std::borrow::Cow;\n\n/// A UTF-8-encoded fixed string\n///\n/// <div"
},
{
"path": "clap_builder/src/builder/possible_value.rs",
"chars": 6850,
"preview": "use crate::builder::IntoResettable;\nuse crate::builder::Str;\nuse crate::builder::StyledStr;\n#[cfg(feature = \"help\")]\nuse"
},
{
"path": "clap_builder/src/builder/range.rs",
"chars": 8714,
"preview": "/// Values per occurrence for an argument\n#[derive(Copy, Clone, PartialEq, Eq, Hash)]\npub struct ValueRange {\n start_"
},
{
"path": "clap_builder/src/builder/resettable.rs",
"chars": 5527,
"preview": "// Unlike `impl Into<Option<T>>` or `Option<impl Into<T>>`, this isn't ambiguous for the `None`\n// case.\n\nuse crate::bui"
},
{
"path": "clap_builder/src/builder/str.rs",
"chars": 7321,
"preview": "#[cfg(feature = \"string\")]\nuse std::borrow::Cow;\n\n/// A UTF-8-encoded fixed string\n///\n/// <div class=\"warning\">\n///\n///"
},
{
"path": "clap_builder/src/builder/styled_str.rs",
"chars": 7764,
"preview": "#![cfg_attr(not(feature = \"usage\"), allow(dead_code))]\nuse std::borrow::Cow;\n\n/// Terminal-styling container\n///\n/// Sty"
},
{
"path": "clap_builder/src/builder/styling.rs",
"chars": 5818,
"preview": "//! Terminal [`Styles`] for help and error output\n\npub use anstyle::*;\n\n/// Terminal styling definitions\n///\n/// See als"
},
{
"path": "clap_builder/src/builder/tests.rs",
"chars": 1306,
"preview": "use crate::Arg;\nuse crate::Command;\n\n#[test]\nfn propagate_version() {\n let mut cmd = Command::new(\"test\")\n .pr"
},
{
"path": "clap_builder/src/builder/value_hint.rs",
"chars": 3872,
"preview": "use std::str::FromStr;\n\n/// Provide shell with hint on how to complete an argument.\n///\n/// See [`Arg::value_hint`][crat"
},
{
"path": "clap_builder/src/builder/value_parser.rs",
"chars": 84026,
"preview": "use std::convert::TryInto;\nuse std::ops::RangeBounds;\n\nuse crate::builder::Str;\nuse crate::builder::StyledStr;\nuse crate"
},
{
"path": "clap_builder/src/derive.rs",
"chars": 15050,
"preview": "//! This module contains traits that are usable with the `#[derive(...)]`\n//! macros in `clap_derive`.\n\nuse crate::build"
},
{
"path": "clap_builder/src/error/context.rs",
"chars": 3576,
"preview": "/// Semantics for a piece of error information\n#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]\n#[non_exhaustive]\n#[cf"
},
{
"path": "clap_builder/src/error/format.rs",
"chars": 17483,
"preview": "#![allow(missing_copy_implementations)]\n#![allow(missing_debug_implementations)]\n#![cfg_attr(not(feature = \"error-contex"
},
{
"path": "clap_builder/src/error/kind.rs",
"chars": 13634,
"preview": "/// Command line argument parser kind of error\n#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]\n#[non_exhaustive]\npub "
},
{
"path": "clap_builder/src/error/mod.rs",
"chars": 28799,
"preview": "//! Error reporting\n\n#![cfg_attr(not(feature = \"error-context\"), allow(dead_code))]\n#]\npub(cr"
},
{
"path": "clap_builder/src/output/help.rs",
"chars": 1234,
"preview": "#![cfg_attr(not(feature = \"help\"), allow(unused_variables))]\n\n// Internal\nuse crate::builder::Command;\nuse crate::builde"
},
{
"path": "clap_builder/src/output/help_template.rs",
"chars": 40512,
"preview": "// HACK: for rust 1.64 (1.68 doesn't need this since this is in lib.rs)\n//\n// Wanting consistency in our calls\n#![allow("
},
{
"path": "clap_builder/src/output/mod.rs",
"chars": 604,
"preview": "mod help;\n#[cfg(feature = \"help\")]\nmod help_template;\nmod usage;\n\npub(crate) mod fmt;\n#[cfg(feature = \"help\")]\npub(crate"
},
{
"path": "clap_builder/src/output/textwrap/core.rs",
"chars": 5550,
"preview": "/// Compute the display width of `text`\n///\n/// # Examples\n///\n/// **Note:** When the `unicode` Cargo feature is disable"
},
{
"path": "clap_builder/src/output/textwrap/mod.rs",
"chars": 3664,
"preview": "//! Fork of `textwrap` crate\n//!\n//! Benefits of forking:\n//! - Pull in only what we need rather than relying on the com"
},
{
"path": "clap_builder/src/output/textwrap/word_separators.rs",
"chars": 2553,
"preview": "pub(crate) fn find_words_ascii_space(line: &str) -> impl Iterator<Item = &'_ str> + '_ {\n let mut start = 0;\n let "
},
{
"path": "clap_builder/src/output/textwrap/wrap_algorithms.rs",
"chars": 1989,
"preview": "use super::core::display_width;\n\n#[derive(Debug)]\npub(crate) struct LineWrapper<'w> {\n hard_width: usize,\n line_wi"
},
{
"path": "clap_builder/src/output/usage.rs",
"chars": 18783,
"preview": "#![cfg_attr(not(feature = \"usage\"), allow(unused_imports))]\n#![cfg_attr(not(feature = \"usage\"), allow(unused_variables))"
},
{
"path": "clap_builder/src/parser/arg_matcher.rs",
"chars": 7910,
"preview": "// Std\nuse std::ffi::OsString;\nuse std::mem;\nuse std::ops::Deref;\n\n// Internal\nuse crate::INTERNAL_ERROR_MSG;\nuse crate:"
},
{
"path": "clap_builder/src/parser/error.rs",
"chars": 1966,
"preview": "use crate::util::AnyValueId;\n\n/// Violation of [`ArgMatches`][crate::ArgMatches] assumptions\n#[derive(Clone, Debug)]\n#[a"
},
{
"path": "clap_builder/src/parser/features/mod.rs",
"chars": 28,
"preview": "pub(crate) mod suggestions;\n"
},
{
"path": "clap_builder/src/parser/features/suggestions.rs",
"chars": 5140,
"preview": "// Internal\nuse crate::builder::Command;\n\n/// Find strings from an iterable of `possible_values` similar to a given valu"
},
{
"path": "clap_builder/src/parser/matches/arg_matches.rs",
"chars": 66814,
"preview": "// Std\nuse std::any::Any;\nuse std::ffi::{OsStr, OsString};\nuse std::fmt::Debug;\nuse std::iter::{Cloned, Flatten, Map};\nu"
},
{
"path": "clap_builder/src/parser/matches/matched_arg.rs",
"chars": 6177,
"preview": "// Std\nuse std::{\n ffi::{OsStr, OsString},\n iter::{Cloned, Flatten},\n slice::Iter,\n};\n\nuse crate::INTERNAL_ERRO"
},
{
"path": "clap_builder/src/parser/matches/mod.rs",
"chars": 335,
"preview": "mod arg_matches;\nmod matched_arg;\nmod value_source;\n\npub use arg_matches::IdsRef;\npub use arg_matches::RawValues;\npub us"
},
{
"path": "clap_builder/src/parser/matches/value_source.rs",
"chars": 467,
"preview": "/// Origin of the argument's value\n#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]\n#[non_exhaustive]\npub e"
},
{
"path": "clap_builder/src/parser/mod.rs",
"chars": 724,
"preview": "//! [`Command`][crate::Command] line argument parser\n\nmod arg_matcher;\nmod error;\nmod matches;\n#[allow(clippy::module_in"
},
{
"path": "clap_builder/src/parser/parser.rs",
"chars": 66353,
"preview": "// Std\nuse std::{\n cell::Cell,\n ffi::{OsStr, OsString},\n};\n\nuse clap_lex::OsStrExt as _;\n\n// Internal\nuse crate::A"
},
{
"path": "clap_builder/src/parser/validator.rs",
"chars": 18981,
"preview": "// Internal\nuse crate::INTERNAL_ERROR_MSG;\nuse crate::builder::StyledStr;\nuse crate::builder::{Arg, ArgGroup, ArgPredica"
},
{
"path": "clap_builder/src/util/any_value.rs",
"chars": 3252,
"preview": "#[derive(Clone)]\npub(crate) struct AnyValue {\n inner: std::sync::Arc<dyn std::any::Any + Send + Sync + 'static>,\n "
},
{
"path": "clap_builder/src/util/color.rs",
"chars": 2770,
"preview": "use crate::builder::PossibleValue;\nuse crate::derive::ValueEnum;\n\n/// Represents the color preferences for program outpu"
},
{
"path": "clap_builder/src/util/escape.rs",
"chars": 729,
"preview": "#[cfg(feature = \"help\")]\nuse std::borrow::Cow;\n\npub(crate) struct Escape<'s>(pub(crate) &'s str);\n\nimpl<'s> Escape<'s> {"
},
{
"path": "clap_builder/src/util/flat_map.rs",
"chars": 6626,
"preview": "#![allow(dead_code)]\n\nuse std::borrow::Borrow;\n\n/// Flat (Vec) backed map\n///\n/// This preserves insertion order\n#[deriv"
},
{
"path": "clap_builder/src/util/flat_set.rs",
"chars": 2342,
"preview": "#![allow(dead_code)]\n\nuse std::borrow::Borrow;\n\n/// Flat (Vec) backed set\n///\n/// This preserves insertion order\n#[deriv"
},
{
"path": "clap_builder/src/util/graph.rs",
"chars": 1096,
"preview": "#[derive(Debug)]\nstruct Child<T> {\n id: T,\n children: Vec<usize>,\n}\n\nimpl<T> Child<T> {\n fn new(id: T) -> Self "
},
{
"path": "clap_builder/src/util/id.rs",
"chars": 4148,
"preview": "use crate::builder::Str;\n#[cfg(feature = \"string\")]\nuse std::borrow::Cow;\n\n/// [`Arg`][crate::Arg] or [`ArgGroup`][crate"
},
{
"path": "clap_builder/src/util/mod.rs",
"chars": 1136,
"preview": "#![allow(clippy::single_component_path_imports)]\n\nmod any_value;\nmod escape;\npub(crate) mod flat_map;\npub(crate) mod fla"
},
{
"path": "clap_builder/src/util/str_to_bool.rs",
"chars": 776,
"preview": "/// True values are `y`, `yes`, `t`, `true`, `on`, and `1`.\npub(crate) const TRUE_LITERALS: [&str; 6] = [\"y\", \"yes\", \"t\""
},
{
"path": "clap_complete/CHANGELOG.md",
"chars": 22816,
"preview": "# Change Log\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Change"
},
{
"path": "clap_complete/CONTRIBUTING.md",
"chars": 454,
"preview": "# How to Contribute\n\nSee the [clap-wide CONTRIBUTING.md](../CONTRIBUTING.md). This will contain `clap_complete` specifi"
},
{
"path": "clap_complete/Cargo.toml",
"chars": 2327,
"preview": "[package]\nname = \"clap_complete\"\nversion = \"4.6.0\"\ndescription = \"Generate shell completion scripts for your clap::Comma"
},
{
"path": "clap_complete/README.md",
"chars": 1221,
"preview": "<!-- omit in TOC -->\n# clap_complete\n\n> **Shell completion generation for `clap`**\n\n[ -> clap::Command {\n clap::Command::new(\"dynamic\")\n .arg(\n clap::Arg::new(\"input\")\n "
},
{
"path": "clap_complete/examples/exhaustive.rs",
"chars": 9249,
"preview": "use clap::builder::PossibleValue;\nuse clap_complete::{Generator, Shell, generate};\n\nfn main() {\n #[cfg(feature = \"uns"
},
{
"path": "clap_complete/src/aot/generator/mod.rs",
"chars": 8493,
"preview": "//! Shell completion machinery\n\npub mod utils;\n\nuse std::ffi::OsString;\nuse std::fs::File;\nuse std::io::Error;\nuse std::"
},
{
"path": "clap_complete/src/aot/generator/utils.rs",
"chars": 9220,
"preview": "//! Helpers for writing generators\n\nuse clap::{Arg, Command};\n\n/// Gets all subcommands including child subcommands in t"
},
{
"path": "clap_complete/src/aot/mod.rs",
"chars": 1551,
"preview": "//! Prebuilt completions\n//!\n//! ## Quick Start\n//!\n//! - For generating at compile-time, see [`generate_to`]\n//! - For "
},
{
"path": "clap_complete/src/aot/shells/bash.rs",
"chars": 9901,
"preview": "use std::{\n fmt::Write as _,\n io::{Error, Write},\n};\n\nuse clap::{Arg, Command, ValueHint};\n\nuse crate::generator::"
},
{
"path": "clap_complete/src/aot/shells/elvish.rs",
"chars": 4451,
"preview": "use std::io::{Error, Write};\n\nuse clap::Command;\nuse clap::builder::StyledStr;\n\nuse crate::INTERNAL_ERROR_MSG;\nuse crate"
},
{
"path": "clap_complete/src/aot/shells/fish.rs",
"chars": 11134,
"preview": "use std::io::{Error, Write};\n\nuse clap::{Arg, Command, ValueHint, builder};\n\nuse crate::generator::{Generator, utils};\n\n"
},
{
"path": "clap_complete/src/aot/shells/mod.rs",
"chars": 236,
"preview": "//! Shell-specific generators\n\nmod bash;\nmod elvish;\nmod fish;\nmod powershell;\nmod shell;\nmod zsh;\n\npub use bash::Bash;\n"
},
{
"path": "clap_complete/src/aot/shells/powershell.rs",
"chars": 4874,
"preview": "use std::io::{Error, Write};\n\nuse clap::builder::StyledStr;\nuse clap::{Arg, Command};\n\nuse crate::INTERNAL_ERROR_MSG;\nus"
},
{
"path": "clap_complete/src/aot/shells/shell.rs",
"chars": 5002,
"preview": "use std::fmt::Display;\nuse std::io::Error;\nuse std::path::Path;\nuse std::str::FromStr;\n\nuse clap::ValueEnum;\nuse clap::b"
},
{
"path": "clap_complete/src/aot/shells/zsh.rs",
"chars": 22081,
"preview": "use std::io::{Error, Write};\n\nuse clap::{Arg, ArgAction, Command, ValueHint};\n\nuse crate::INTERNAL_ERROR_MSG;\nuse crate:"
},
{
"path": "clap_complete/src/engine/candidate.rs",
"chars": 3013,
"preview": "use std::ffi::OsStr;\nuse std::ffi::OsString;\n\nuse clap::builder::StyledStr;\n\n/// A shell-agnostic completion candidate\n#"
},
{
"path": "clap_complete/src/engine/complete.rs",
"chars": 24461,
"preview": "use std::ffi::OsStr;\nuse std::ffi::OsString;\n\nuse clap_lex::OsStrExt as _;\n\nuse super::ArgValueCandidates;\nuse super::Ar"
},
{
"path": "clap_complete/src/engine/custom.rs",
"chars": 11037,
"preview": "use std::any::type_name;\nuse std::ffi::OsStr;\nuse std::sync::Arc;\n\nuse clap::builder::ArgExt;\nuse clap::builder::Command"
},
{
"path": "clap_complete/src/engine/mod.rs",
"chars": 379,
"preview": "//! `clap`-native completion system\n//!\n//! See [`complete()`]\n\nmod candidate;\nmod complete;\nmod custom;\n\npub use candid"
},
{
"path": "clap_complete/src/env/mod.rs",
"chars": 12572,
"preview": "//! [`COMPLETE=$SHELL <bin>`][CompleteEnv] completion integration\n//!\n//! See [`CompleteEnv`]:\n//! ```rust\n//! # use cla"
},
{
"path": "clap_complete/src/env/shells.rs",
"chars": 15528,
"preview": "use std::ffi::OsString;\nuse std::str::FromStr;\n\nuse super::EnvCompleter;\n\n/// Bash completion adapter\n#[derive(Copy, Clo"
},
{
"path": "clap_complete/src/lib.rs",
"chars": 3362,
"preview": "// Copyright ⓒ 2015-2018 Kevin B. Knapp\n//\n// `clap_complete` is distributed under the terms of both the MIT license and"
},
{
"path": "clap_complete/src/macros.rs",
"chars": 242,
"preview": "#[cfg(feature = \"debug\")]\nmacro_rules! debug {\n ($($arg:tt)*) => {\n eprint!(\"[{:>w$}] \\t\", module_path!(), w ="
},
{
"path": "clap_complete/tests/examples.rs",
"chars": 341,
"preview": "#[test]\nfn example_tests() {\n let t = trycmd::TestCases::new();\n let features: &[&str] = &[\n #[cfg(feature "
},
{
"path": "clap_complete/tests/snapshots/aliases.bash",
"chars": 1713,
"preview": "_my-app() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINFO[0]}\" -ge 4 ]]; then\n cur=\"$"
},
{
"path": "clap_complete/tests/snapshots/aliases.elvish",
"chars": 950,
"preview": "\nuse builtin;\nuse str;\n\nset edit:completion:arg-completer[my-app] = {|@words|\n fn spaces {|n|\n builtin:repeat "
},
{
"path": "clap_complete/tests/snapshots/aliases.fish",
"chars": 225,
"preview": "complete -c my-app -s o -s O -l option -l opt -d 'cmd option' -r\ncomplete -c my-app -s f -s F -l flag -l flg -d 'cmd fla"
},
{
"path": "clap_complete/tests/snapshots/aliases.ps1",
"chars": 2227,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/aliases.zsh",
"chars": 933,
"preview": "#compdef my-app\n\nautoload -U is-at-least\n\n_my-app() {\n typeset -A opt_args\n typeset -a _arguments_options\n loca"
},
{
"path": "clap_complete/tests/snapshots/basic.bash",
"chars": 3262,
"preview": "_my-app() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINFO[0]}\" -ge 4 ]]; then\n cur=\"$"
},
{
"path": "clap_complete/tests/snapshots/basic.elvish",
"chars": 1191,
"preview": "\nuse builtin;\nuse str;\n\nset edit:completion:arg-completer[my-app] = {|@words|\n fn spaces {|n|\n builtin:repeat "
},
{
"path": "clap_complete/tests/snapshots/basic.fish",
"chars": 1653,
"preview": "# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.\nfunction __fish_my_app_g"
},
{
"path": "clap_complete/tests/snapshots/basic.ps1",
"chars": 2522,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/basic.zsh",
"chars": 2453,
"preview": "#compdef my-app\n\nautoload -U is-at-least\n\n_my-app() {\n typeset -A opt_args\n typeset -a _arguments_options\n loca"
},
{
"path": "clap_complete/tests/snapshots/custom_bin_name.bash",
"chars": 3300,
"preview": "_bin-name() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINFO[0]}\" -ge 4 ]]; then\n cur="
},
{
"path": "clap_complete/tests/snapshots/custom_bin_name.elvish",
"chars": 1205,
"preview": "\nuse builtin;\nuse str;\n\nset edit:completion:arg-completer[bin-name] = {|@words|\n fn spaces {|n|\n builtin:repea"
},
{
"path": "clap_complete/tests/snapshots/custom_bin_name.fish",
"chars": 1703,
"preview": "# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.\nfunction __fish_bin_name"
},
{
"path": "clap_complete/tests/snapshots/custom_bin_name.ps1",
"chars": 2536,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/custom_bin_name.zsh",
"chars": 2503,
"preview": "#compdef bin-name\n\nautoload -U is-at-least\n\n_bin-name() {\n typeset -A opt_args\n typeset -a _arguments_options\n "
},
{
"path": "clap_complete/tests/snapshots/external_subcommands.bash",
"chars": 3282,
"preview": "_my-app() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINFO[0]}\" -ge 4 ]]; then\n cur=\"$"
},
{
"path": "clap_complete/tests/snapshots/external_subcommands.elvish",
"chars": 1097,
"preview": "\nuse builtin;\nuse str;\n\nset edit:completion:arg-completer[my-app] = {|@words|\n fn spaces {|n|\n builtin:repeat "
},
{
"path": "clap_complete/tests/snapshots/external_subcommands.fish",
"chars": 1411,
"preview": "# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.\nfunction __fish_my_app_g"
},
{
"path": "clap_complete/tests/snapshots/external_subcommands.ps1",
"chars": 2164,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/external_subcommands.zsh",
"chars": 2471,
"preview": "#compdef my-app\n\nautoload -U is-at-least\n\n_my-app() {\n typeset -A opt_args\n typeset -a _arguments_options\n loca"
},
{
"path": "clap_complete/tests/snapshots/feature_sample.bash",
"chars": 3456,
"preview": "_my-app() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINFO[0]}\" -ge 4 ]]; then\n cur=\"$"
},
{
"path": "clap_complete/tests/snapshots/feature_sample.elvish",
"chars": 1428,
"preview": "\nuse builtin;\nuse str;\n\nset edit:completion:arg-completer[my-app] = {|@words|\n fn spaces {|n|\n builtin:repeat "
},
{
"path": "clap_complete/tests/snapshots/feature_sample.fish",
"chars": 1761,
"preview": "# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.\nfunction __fish_my_app_g"
},
{
"path": "clap_complete/tests/snapshots/feature_sample.ps1",
"chars": 3130,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/feature_sample.zsh",
"chars": 2700,
"preview": "#compdef my-app\n\nautoload -U is-at-least\n\n_my-app() {\n typeset -A opt_args\n typeset -a _arguments_options\n loca"
},
{
"path": "clap_complete/tests/snapshots/home/.gitignore",
"chars": 57,
"preview": "# Fish\nconf.d\nfish_variables\nfunctions\n\n# Zsh\n.zcompdump\n"
},
{
"path": "clap_complete/tests/snapshots/home/dynamic-env/exhaustive/bash/.bashrc",
"chars": 1194,
"preview": "PS1='% '\n. /etc/bash_completion\n\n_clap_complete_exhaustive() {\n local IFS=$'\\013'\n local _CLAP_COMPLETE_INDEX=${CO"
},
{
"path": "clap_complete/tests/snapshots/home/dynamic-env/exhaustive/elvish/elvish/rc.elv",
"chars": 316,
"preview": "set edit:rprompt = (constantly \"\")\nset edit:prompt = (constantly \"% \")\n\nset edit:completion:arg-completer[exhaustive] = "
},
{
"path": "clap_complete/tests/snapshots/home/dynamic-env/exhaustive/fish/fish/completions/exhaustive.fish",
"chars": 188,
"preview": "complete --keep-order --exclusive --command exhaustive --arguments \"(COMPLETE=fish exhaustive -- (commandline --current-"
},
{
"path": "clap_complete/tests/snapshots/home/dynamic-env/exhaustive/fish/fish/config.fish",
"chars": 128,
"preview": "set -U fish_greeting \"\"\nset -U fish_autosuggestion_enabled 0\nfunction fish_title\nend\nfunction fish_prompt\n printf '%%"
},
{
"path": "clap_complete/tests/snapshots/home/dynamic-env/exhaustive/zsh/.zshenv",
"chars": 185,
"preview": "fpath=($fpath $ZDOTDIR/zsh)\nautoload -U +X compinit && compinit -u # bypass compaudit security checking\nprecmd_functions"
},
{
"path": "clap_complete/tests/snapshots/home/dynamic-env/exhaustive/zsh/zsh/_exhaustive",
"chars": 1143,
"preview": "#compdef exhaustive\nfunction _clap_dynamic_completer_exhaustive() {\n local _CLAP_COMPLETE_INDEX=$(expr $CURRENT - 1)\n"
},
{
"path": "clap_complete/tests/snapshots/home/static/exhaustive/bash/.bashrc",
"chars": 44395,
"preview": "PS1='% '\n. /etc/bash_completion\n_exhaustive() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINF"
},
{
"path": "clap_complete/tests/snapshots/home/static/exhaustive/bash/.inputrc",
"chars": 52,
"preview": "# expected empty file to disable loading ~/.inputrc\n"
},
{
"path": "clap_complete/tests/snapshots/home/static/exhaustive/elvish/elvish/rc.elv",
"chars": 10728,
"preview": "set edit:rprompt = (constantly \"\")\nset edit:prompt = (constantly \"% \")\n\nuse builtin;\nuse str;\n\nset edit:completion:arg-c"
},
{
"path": "clap_complete/tests/snapshots/home/static/exhaustive/fish/fish/completions/exhaustive.fish",
"chars": 18500,
"preview": "# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.\nfunction __fish_exhausti"
},
{
"path": "clap_complete/tests/snapshots/home/static/exhaustive/fish/fish/config.fish",
"chars": 128,
"preview": "set -U fish_greeting \"\"\nset -U fish_autosuggestion_enabled 0\nfunction fish_title\nend\nfunction fish_prompt\n printf '%%"
},
{
"path": "clap_complete/tests/snapshots/home/static/exhaustive/powershell/powershell/Microsoft.PowerShell_profile.ps1",
"chars": 25282,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/home/static/exhaustive/zsh/.zshenv",
"chars": 185,
"preview": "fpath=($fpath $ZDOTDIR/zsh)\nautoload -U +X compinit && compinit -u # bypass compaudit security checking\nprecmd_functions"
},
{
"path": "clap_complete/tests/snapshots/home/static/exhaustive/zsh/zsh/_exhaustive",
"chars": 28493,
"preview": "#compdef exhaustive\n\nautoload -U is-at-least\n\n_exhaustive() {\n typeset -A opt_args\n typeset -a _arguments_options\n"
},
{
"path": "clap_complete/tests/snapshots/multi_value_option.bash",
"chars": 1274,
"preview": "_my-app() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINFO[0]}\" -ge 4 ]]; then\n cur=\"$"
},
{
"path": "clap_complete/tests/snapshots/multi_value_option.elvish",
"chars": 648,
"preview": "\nuse builtin;\nuse str;\n\nset edit:completion:arg-completer[my-app] = {|@words|\n fn spaces {|n|\n builtin:repeat "
},
{
"path": "clap_complete/tests/snapshots/multi_value_option.fish",
"chars": 106,
"preview": "complete -c my-app -l options -d 'multi-valued option' -r\ncomplete -c my-app -s h -l help -d 'Print help'\n"
},
{
"path": "clap_complete/tests/snapshots/multi_value_option.ps1",
"chars": 1294,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/multi_value_option.zsh",
"chars": 728,
"preview": "#compdef my-app\n\nautoload -U is-at-least\n\n_my-app() {\n typeset -A opt_args\n typeset -a _arguments_options\n loca"
},
{
"path": "clap_complete/tests/snapshots/optional_multi_value_option.bash",
"chars": 1274,
"preview": "_my-app() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINFO[0]}\" -ge 4 ]]; then\n cur=\"$"
},
{
"path": "clap_complete/tests/snapshots/optional_multi_value_option.elvish",
"chars": 656,
"preview": "\nuse builtin;\nuse str;\n\nset edit:completion:arg-completer[my-app] = {|@words|\n fn spaces {|n|\n builtin:repeat "
},
{
"path": "clap_complete/tests/snapshots/optional_multi_value_option.fish",
"chars": 114,
"preview": "complete -c my-app -l options -d 'optional multi-value option' -r\ncomplete -c my-app -s h -l help -d 'Print help'\n"
},
{
"path": "clap_complete/tests/snapshots/optional_multi_value_option.ps1",
"chars": 1302,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/optional_multi_value_option.zsh",
"chars": 704,
"preview": "#compdef my-app\n\nautoload -U is-at-least\n\n_my-app() {\n typeset -A opt_args\n typeset -a _arguments_options\n loca"
},
{
"path": "clap_complete/tests/snapshots/optional_value_option.bash",
"chars": 1274,
"preview": "_my-app() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINFO[0]}\" -ge 4 ]]; then\n cur=\"$"
},
{
"path": "clap_complete/tests/snapshots/optional_value_option.elvish",
"chars": 650,
"preview": "\nuse builtin;\nuse str;\n\nset edit:completion:arg-completer[my-app] = {|@words|\n fn spaces {|n|\n builtin:repeat "
},
{
"path": "clap_complete/tests/snapshots/optional_value_option.fish",
"chars": 108,
"preview": "complete -c my-app -l options -d 'optional value option' -r\ncomplete -c my-app -s h -l help -d 'Print help'\n"
},
{
"path": "clap_complete/tests/snapshots/optional_value_option.ps1",
"chars": 1296,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/optional_value_option.zsh",
"chars": 698,
"preview": "#compdef my-app\n\nautoload -U is-at-least\n\n_my-app() {\n typeset -A opt_args\n typeset -a _arguments_options\n loca"
},
{
"path": "clap_complete/tests/snapshots/quoting.bash",
"chars": 9196,
"preview": "_my-app() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINFO[0]}\" -ge 4 ]]; then\n cur=\"$"
},
{
"path": "clap_complete/tests/snapshots/quoting.elvish",
"chars": 3098,
"preview": "\nuse builtin;\nuse str;\n\nset edit:completion:arg-completer[my-app] = {|@words|\n fn spaces {|n|\n builtin:repeat "
},
{
"path": "clap_complete/tests/snapshots/quoting.fish",
"chars": 4723,
"preview": "# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.\nfunction __fish_my_app_g"
},
{
"path": "clap_complete/tests/snapshots/quoting.ps1",
"chars": 6465,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/quoting.zsh",
"chars": 6451,
"preview": "#compdef my-app\n\nautoload -U is-at-least\n\n_my-app() {\n typeset -A opt_args\n typeset -a _arguments_options\n loca"
},
{
"path": "clap_complete/tests/snapshots/register_dynamic.fish",
"chars": 150,
"preview": "complete -x -c my-app -a 'my-app'\" complete --shell fish -- (commandline --current-process --tokenize --cut-at-cursor) ("
},
{
"path": "clap_complete/tests/snapshots/register_minimal.bash",
"chars": 1002,
"preview": "\n_clap_complete_my_app() {\n local IFS=$'/013'\n local _CLAP_COMPLETE_INDEX=${COMP_CWORD}\n local _CLAP_COMPLETE_C"
},
{
"path": "clap_complete/tests/snapshots/special_commands.bash",
"chars": 7118,
"preview": "_my-app() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINFO[0]}\" -ge 4 ]]; then\n cur=\"$"
},
{
"path": "clap_complete/tests/snapshots/special_commands.elvish",
"chars": 2543,
"preview": "\nuse builtin;\nuse str;\n\nset edit:completion:arg-completer[my-app] = {|@words|\n fn spaces {|n|\n builtin:repeat "
},
{
"path": "clap_complete/tests/snapshots/special_commands.fish",
"chars": 3375,
"preview": "# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.\nfunction __fish_my_app_g"
},
{
"path": "clap_complete/tests/snapshots/special_commands.ps1",
"chars": 5757,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/special_commands.zsh",
"chars": 4896,
"preview": "#compdef my-app\n\nautoload -U is-at-least\n\n_my-app() {\n typeset -A opt_args\n typeset -a _arguments_options\n loca"
},
{
"path": "clap_complete/tests/snapshots/sub_subcommands.bash",
"chars": 7744,
"preview": "_my-app() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINFO[0]}\" -ge 4 ]]; then\n cur=\"$"
},
{
"path": "clap_complete/tests/snapshots/sub_subcommands.elvish",
"chars": 3525,
"preview": "\nuse builtin;\nuse str;\n\nset edit:completion:arg-completer[my-app] = {|@words|\n fn spaces {|n|\n builtin:repeat "
},
{
"path": "clap_complete/tests/snapshots/sub_subcommands.fish",
"chars": 5308,
"preview": "# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.\nfunction __fish_my_app_g"
},
{
"path": "clap_complete/tests/snapshots/sub_subcommands.ps1",
"chars": 7588,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/sub_subcommands.zsh",
"chars": 7516,
"preview": "#compdef my-app\n\nautoload -U is-at-least\n\n_my-app() {\n typeset -A opt_args\n typeset -a _arguments_options\n loca"
},
{
"path": "clap_complete/tests/snapshots/subcommand_last.bash",
"chars": 4306,
"preview": "_my-app() {\n local i cur prev opts cmd\n COMPREPLY=()\n if [[ \"${BASH_VERSINFO[0]}\" -ge 4 ]]; then\n cur=\"$"
},
{
"path": "clap_complete/tests/snapshots/subcommand_last.elvish",
"chars": 1238,
"preview": "\nuse builtin;\nuse str;\n\nset edit:completion:arg-completer[my-app] = {|@words|\n fn spaces {|n|\n builtin:repeat "
},
{
"path": "clap_complete/tests/snapshots/subcommand_last.fish",
"chars": 1603,
"preview": "# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.\nfunction __fish_my_app_g"
},
{
"path": "clap_complete/tests/snapshots/subcommand_last.ps1",
"chars": 2607,
"preview": "\nusing namespace System.Management.Automation\nusing namespace System.Management.Automation.Language\n\nRegister-ArgumentCo"
},
{
"path": "clap_complete/tests/snapshots/subcommand_last.zsh",
"chars": 2893,
"preview": "#compdef my-app\n\nautoload -U is-at-least\n\n_my-app() {\n typeset -A opt_args\n typeset -a _arguments_options\n loca"
}
]
// ... and 397 more files (download for full content)
About this extraction
This page contains the full source code of the clap-rs/clap GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 597 files (3.2 MB), approximately 861.7k tokens, and a symbol index with 3994 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.