clap-rs/
A full featured, fast Command Line Argument Parser for Rust
USD raised
Recent activities
Clap-generated shell completion failing on macOS /bin/bash with: conditional binary operator expected: syntax error near `IFS'
Delegate completions for a specific argument to the completions of an external program
[derive] Argument `test`'s selected action SetTrue contradicts `takes_value`
clap_complete documentation should clearly point to CommandFactory
Deprecate and remove `clap_complete_fig`?
`#[arg(value_delimiter = ':')]` Delimiter isnt displayed in the help message.
Allow longer shorts
(clap_complete) Make `Shell` ValueEnum Parser also Accept $SHELL Output (Path Prefixed Shell Names)
For cli option with custom types, `impl FromStr` with `FromStr::Err` set to `()` won't work
`args_conflicts_with_subcommands` is not overriding `subcommand_required = true`
Don't show global options
Extend help subcommand
Powershell completions not working with empty help string.
Respect `flatten_help` in man pages
Please support user defined dynamic complete command
Support `arg_require_else_help` natively in the derive
Expose inner error context to allow removing pieces of context, for consistency
Support subcommand flags in native completion engine
Complete multiple path elements at once
Unclear error message: "Found non-required positional argument with a lower index than ..."
Mutual exclusion of groups of args
`disable` subcommands / flags, to the tune of `hide` in `derive` mode
`Vec<Option<_>>` with `num_args(0..)` Ignores flags passed with no value
Clap completion can't tell positional args apart
clap_complete: incorrect args appear on nested subcommands with the same name
Design Document: First Step Towards Modularity
`default_value_if` does not respect `global(true)`
Clap outputs wrong error message context when using an environment variable with invalid content
Document how to use ArgGroups from derive API
Support for using `{n}` in the help message
clap_complete_nushell: multi line comments break with verbatim_doc_comment
docs: link to table of contents instead of first chapter for tutorial
Show the type of arguments in help message?
Selectively disable word wrapping
Combine long_flag and long_flag_aliases into one API?
Stack overflows when on Debug mode on Windows
Default value seems to be cached, resulting in wrong default
Strange compilation error "error: expected `,`" in arg derive
Parsing error on positional arguments after mixing a multiple-valued positional arg with a flag
Clap doesn't show help when env variable exists
Subcommands based on other inputs
A version of `Parser::parse_from` that reads a mock of the environment, for use in testing
Allow more granular styling
Remove `unstable-styles`
Allow customizing styling of `[default]`, `[possible values]`, `[env]` in arg description
#[command(flatten)] on optional field makes it required
Default value that panics only if neither `arg` nor `env` provided
Update documentation for `arg` macro
The latest update enforces 1.7.9 rust version, breaking build pipelines.
custom {all-args} help output - first line wrong indent
`UnknownArgumentValueParser` can only be used with string value argument
Avoid printing trailing whitespace in help output
Error message APIs for `TypedValueParser`
Support custom help messages for completions
Dynamic Completions: Filter and order completions based on input and importance
Variant of allow_hyphen_values that treats `--` like a regular value
Please support `flatten`ing an `Args` and mutating arguments before merging
`ContextKind::Custom` has no functionality
Use flags as subcommands (like `tar`)
Conflicts seem to not be handled properly when using a group
`value_terminator` has no effect when it is the first argument
Make `last` take precedence over `allow_hyphen_values`
Add `mut_group` to `Command`
Example Not Working
Provide better did-you-mean suggestions for swapped words
Global arguments with a `requires` clause don't work under subcommands when specified through environment variables
`derive(Parser)` fails when using type alias
Make `wrap_help` a default feature
Generated bash completion script not work in POSIX mode
mangen: verbatim_doc_comment has no effect
Can't specify multiple vector elements using env vars
clap_complete panics if subcomand has bin_name defined
Derive: specifying invalid struct field type fails with Epic error message
Support parsing smart pointers
Provide ability to 'opt into' case insensitive option/argument names
Default display for `String` is awkward, ie `[default: ]`
Deprecate and remove `Parser::update_from`?
Add repository / homepage URL to `help_template` keys
Automatically defer subcommand initialization for derives
Expose source spans for errors with error-context
clap 4.3: Implementation of `FnOnce` is not general enough
`name` is documented to default to the crate name, but it defaults to the package name
Change help message when prompt skippable
Add ability to remove a subcommand
Display order of subcommands' pre-existing args is not merged/updated
`default_value_if` with `IsPresent` doesn't ignore defaults
Completions shouldn't suggest options unless the current token starts with a `-`
panics with error incomprehensible to `#[derive(..)]` user
First example of Arg::default_value_if uses the wrong predicate
Possible bug with enum fields
`Error::new` takes a `Display` rather than a `StyledStr`
clap suggests hidden subcommands in errors
clap suggests hidden subcommands
Multiple optional arguments are displayed incorrectly in help output
Prettier typography when `unicode` feature is set?
Please provide an argument to make the derive automatically generate a test
Automatically detect allow_missing_positional
better compile time validation of value_parser types
Dependency Dashboard
bash generated completions invalid when command name contains spaces
Add `-r, --recursive` flags to help command
Value terminator is not included anywhere in help message
[modular] User-driven values (defaults, env vars, implied values, etc)
`term_width` docs on disabled `wrap_help` seem wrong
Use of ArgAction::Set instead of ArgAction::SetTrue gives confusing runtime error
Man page synopsis doesn't use the bin_name
Add logic to ArgPredicate
Generate `.env` string form Command
Help message output is not sorted by option name
error messages should textwrap like `--help`
default_value_if depends on order in struct
`is_multiple` shouldn't require `&mut self`
`requires` is bypassed when other items from a mutually-exclusive `group` are present
Ability to require_equals with optional value for long option, but require value for short option.
Avoid `Arg::id` ambiguity in derive by naming it for `Type::field` instead of `field`
Optional, nested flatten gets ignored (nested ArgGroups are unsupported)
clap_complete: add Xonsh shell support
Add functions `required_unless_eq_any` and `required_unless_eq_all` for `Arg` and `ArgGroup`
Help output does not indicate `ArgAction::Append`
Singular used even when multiple suggestions exist `note: subcommand 'foo', 'bar' exist`
Unexpected behavior with `Vec<_>` argument types for positionals and options
Zsh shell completion doesn't work for flags/args that come after positional values
allow_missing_positional with allow_hyphen_values not working
Having a unique display name and an execution name for commands
Improve how we infer behavior from field types
Add method to parse environment variables from custom source
Unexpected behaviour of `default_value_t` when `From<&str>` impl isn't the inverse of `Display` impl
Help heading descriptions
Allow wrap_help without terminal_size dependency
Can't build with any version of Clap 4 due to rustix dependency
Required field inside a struct that conflicts with another arg is still demanded
numbers as varying radix values, 15 0xF 0o17 1111
Support non-Display types with `default_value_t`
Allow for default values with PathBufs
default_value do not take effect when flatten structs which have same struct field name C-bug
Help switches from next-line back to same-line format when name/placeholder gets *wider*
Non-mut functuions in `FromArgMatches` aren't meant to be there?
Allow global args in top-level multicall
`requires` is bypassed when using `conflicts_with` a certain way
Large `Args` struct causes stack overflow on Intel SGX
Derive API: `#[arg(num_args = <...>)]` on `Vec<T>` has no effect
May `Parser::update_from` not deny the presence of flags (option of type `bool`) ?
Allow short options to not accept implicitly attached values (`-sfoo`)
`Default`-able arguments are "missing" when encountering unknown flag with `ignore_errors`
Printing an argument from `get_positionals()` panicks with "Fatal internal error"
Clap panics on positional bools in debug builds
Invalid TLS cert on https://clap.rs/
[Derive] Way to parse long_help from doc comments excluding
Support for Vec<T> Subcommands
Simplify Alias API / code
Allow visible aliases for PossibleValue
`exclusive(true)` worked in `v4.0.6` and broke in `v4.0.7`
Implement a partial parse method for Command
Ignore errors disables help flag
`ignore_errors` makes boolean flag required in clap 4
`ArgMatches.grouped_values_of()` does not support groups
Custom help option always requires an argument
`TypedValueParser` cannot parse/validate an `OsStr` with full error context
Can't use ValueParser to replace PossibleValues in v4
Issue when inferring lifetimes when used with serde.
clap4 requires that options implement `Send` and `Sync`
Hide `--help` (but still handle it) if `help` subcommand exists
Fix(Typo) no close bracket in example
Bugs & Inconsistencies with ValueEnum Vectors
Derive requires field types to impl `Clone`
No way to accept unbounded number of a custom formatted values that starts with a hyphen
Short flags in a subcommands subcommand produce errors
Combining short flags (with subcommand short flag) produces errors
Flatten structs causes "Argument group name must be unique" if has same name
Bash completion for `git diff git` suggests only top-level completions
Subcommand aliases not included in completion scripts
Make `Command::args_overrides_self` the default
range method not found in `_AnonymousValueParser(usize)`
Vector of anonymous args + named arg + subcommand leads to USAGE which fails to parse with `cargo run ... --`
Subcommand flags are separated by spaces while argument flags use commas
[clap_mangen] Subcommand references in man pages miss prefix
Expose a hidden(non-visible) aliases
`arg_invalid_show_help(bool)` option
Expose `#[derive(Args)]` as an `ArgGroup`
Set required(false) by default for all arguments
Error message does not match usage
Pager for help output
Context-Aware Multiple Usage from Argument Groups
Support externally supplying a terminal width when running outside a tty
Wrong fish completion is generated if the help description of the value has the comma
Arg::value_parser does not implicitly set Arg::takes_value
Implement convenient helper methods for `PathBufValueParser` to reduce boilerplate
Inconsistent on inferring Help/Version action
Syntax error when attempt ZSH completion for `ValueEnum` variants
Ensure v3 deprecation messages are useful for migrating people
`.action(ArgAction::Help)` and `ArgAction::Version` bypass
Lifetime of possible values and PossibleValueParser
Error with multiple flags and positional arguments
Argument is still required even when required is set to false in derive macro.
Support hiding flags/subcommands/possible values for native compeletions
Derive's case conversion removes non-ASCII BMP char
Prevent specifying global args multiple times
convenient argument/option deprecation
Ability to generate help output golden test file?
clap_derive: Default value support for Vec of ValueEnums
Document different options for activating completions
Support `is_require_equal_set` in native completions
Support delimited values for native completions
Support multiple values in native completions
Support flags with values in native completions
elvish support for native completions
powershell support for native completions
fish support for native completions
zsh support for native completions
Allow a field's type to be different than the value parser type
clap_derive: Merge/inherit `ValueEnum` (sharing enum variants in `ValueEnum`)
clap_complete: zsh completion doesn't add conflicts for group
Multiple value doesn't work when the first argument attached to short flag
get_arg_conflicts_with panics if arg conflicts with group.
Duplicating a subcommand name as a subcommand alias is not prevented
Document external subcommands
"allow_hyphen_values" absorbs short options (-f), but not long options (--flag)
Return help message as String for Command
Environment variable sometimes overrides global arg, new in 3.2
Documentation for value_enum how to print possible values in help
`ArgAction::Count` type error not caught at compile time
Set default subcommand via Derive API
Failed to get clap dependency
derive: Store indices, value source next to field values
Using `default_value_ifs` with `required` returns error about argument not being provided sometime after 3.1.12
Argument descriptions not aligned when mixing positional arguments with others under a help heading
Improve `clap_derive` error/warnings by always adding spans
Using clap derive triggers a ton of deprecation warnings
New Version Produces Numerous Spurious Deprecation Warnings
Deprecate `ArgMatches::get_raw`
Port `required_if_eq` to the typed API
Port `default_value_t` to the Builder API
Update `arg!` to set Actions
DisableColoredHelp and less decorated formatting in general from a user side
`max_values` confusingly returns `ErrorKind::UnknownArgument` when too many arguments are provided
Request: add ValueHint::NewFilePath
Derive reference doesn't mention group
ArgGroups values don't work well with get_many
Is `Arg::validator_regex` even needed anymore?
`get_one` / `get_many` functions should produce `MatchesError` when wrong one is used
Setting external subcommand type is inconsistent with args
derive error for missing `= value` for attributes is confusing
`hide_env_values()` can't be used via the Derive API
Users can accidentally design broken CLIs when combining subcommands with unbounded positional arguments
Allow for generating a "catch-all" branch when generating completions
No way to rename value names across entire struct
Allow to use `Option<T: Args>` with flatten
Create a configurable command alias example
Duplicate output in USAGE message if called with conflict argument
Breaking change in the 3.1.11 release
arg!: parsing problem of whether Arg or Value is required
Improved fish shell completion with filename parameters
Add the ability to add alternative names for subcommand variants with `#[clap]` attribute
Add an option to not panic on value*of() of non valid arguments
derive: make boolean `clap()` args (`require`, `global`, ...) default to true if specified
When the root command has a required argument, it is not output to the subcommand help.
Suggest removing `--` if specified, but unnecessary
Required arg with <TYPE> tag and default value always errors in debug build but never in release
Exclusive can not be used with required
`arg!(--long-arg "foo")` doesn't behave in expected way
Reuse USAGE from clap in generated man pages
Separate section for Positional Arguments in generated manpages
`.arg_required_else_help().subcommand_required()` does not replicate SubcommandRequiredElseHelp with env variables
Underscore derive options converted to hyphen?
clap_generate: completion on subcommand is always default, even if it takes no values
`#[derive(ArgEnum)]` fails silently on enums with non-unit variants
Stack overflow when using too many arguments with `arg!()`
Add to Derive Reference an example of what a derive exapnds to
Derive feature: Add a prefix for env vars
derive feature: an attribute to add a prefix to all arg names in a struct, for use with flatten
derive feature: an attribute to add a prefix to all arg names, for use with flatten
Add builder / derive interop examples
Derive API tutorial refers to Builder API concepts rather than the derive API attributes
AppSettings::AllowHyphenValues does not document what it does beyond ArgSettings::AllowHyphenValues
Deprecate WaitOnError
Not obvious how to provide multiple usage statements with `App::override_usage()`
Short options with arguments conflicts with AllowHyphenValues
cannot have an option named "version"
short `-h` conflicts with help rather than overwriting it
Single-source feature documentation
When deriving Parser, multi-sentence doc comments have final period removed
Unclear how to handle subcommands with `clap_man`
Should we separate arguments by help heading in `clap_man`?
`clap_man` should respect the configured display order for args and subcommands
Show `PossibleVaue::help` in clap_man
`clap_man` doesn't show the right number of value names
`clap_man` doesn't render optional values with `[=<VALUE>]`
`clap_man` doesn't consider an option required when its arg group is required
`clap_man` forces the `env` feature on
Ability to customize man pages
allow_invalid_utf8(true) required only in debug build
Non-conflicting args
Add support for arg stability attributes (unstable/deprecated)
3 leading hyphens for options (`---long`)
[clap_derive] version conflict with `proc-macro2`
-h short help switches from single to multiple lines when adding a value_name entry
`help help` is colorized with DisableColoredHelp
multiple args not working with clap derive on Vec<Foo> type
Positional arg after repeated positional arg - prefer compiler error to runtime error
Derive should only show help when argc==1 rather than missing subcommand
support multiple completers in Zsh
[clap_complete] Missing newline character for zsh completion at the end
AppSettings::SubcommandRequiredElseHelp affects "leaf" subcommands that don't have own subcommands
Arg Methods with flattened
Support `CommandWithArguments` hint for
unused_braces warning for default_value_t
Allow the name of PossibleValue derived by ArgEnum to be specified
Remove `{n}` support
Add an env_prefix derive option for a consistent prefix for environment variables
Setting long description causes long_version() to be used in --help output
default_value may not be included in possible_values and only checked in a runtime
Introduce possible_values_t
verbatim_doc_comment should provide ability to escape newlines like in string literals
Derive documentation can be improved
Make it easier to use clap validators with derive by generating arg associated constants?
Stablize Rust-Native Completion Engine Tracking Issue
Leverage clap's parser for completions
Clink completions for Windows users
Numbers of methods of arg and app building in FAQ.md are wrong.
Support multiple arguments writing to the same destination
Validate interaction between args and subcommands
Duplicate short option (and other misconfigurations) gives runtime error, wouldn't it be cool, if it was compile time error
Question - how can I print the arguments given an opt instance?
`serde`-like default value behavior
Custom collections
Layering env, args, and config
The header for my examples are not colored like the others
`App` feels like an awkward name in the API
Deprecate runtime usage parser
conflicts_with overriding required isn't two way
`App::about` and `Arg::help` are inconsistent
Use ArgSettings to store `Arg::exclusive`
ArgMatches method to get the alias used (and long or short version)
Infer trait bounds for generic derives
'Argument 'x' is required and can't have a default value' when using default_value_os with #[derive(Clap)]
Optional option-argument parsing is incorrect
Support alternative name/value separator
Remove parts of API marked as deprecated
[modular] User-driven validation
Enhance error messages, check argument names for correctness
Derive attribute that specializes a user-provided function that gets to modify `Arg`
Custom Clap Crate Path
[modular] Pull out a clap_lex
[modular] Decouple help format from help generation
[modular] Decouple help generation from clap
[modular] Decouple clap_generate from the builder API
Mutable app functions are confusing to users and awkward to work with
Args/Subcommand app settings shouldn't impact what they are flattened into
derive: env! doesn't work with custom build variables
Shell completions include `--version` on subcommands despite no version set
A subcommand is not optional when using derive macros
Deprecate cargo macros
Remove / Deprecate cargo macros
Support `default_missing_value_t`, `default_value_if_t`, etc
Please default to DisableVersionForSubcommands
Color should be exposed as a single enum, not individual Settings
Builder and `clap_derive` should be WYSIWYG
User confusion over help messages not being colored, despite color being enabled
Don't leak `help_heading` when flattening
Missing trailing newline on help with disabled flag and subcommand
Auto-generated completion scripts add `NuShell` support
Very large display_order values cause a crash while displaying help
Duplicate output in usage help if called with missing argument
Don't suggest `--` in errors if it isn't relevant
Compile regression with nested subcommands in 3.0.0-beta.4
Pass `None` to `default_value_if`, or better adding `default_value_if_not_set`?
error[E0658]: arbitrary expressions in key-value attributes are unstable
Regroup "similar" flags/options in the help prompt
MSRV broken in minor version
Support `abbout` for `possible_values` e.g. `ArgEnum`
clap_generate fish: ArgEnum completions not working on toplevel command
Support fish correct completion for nested subcommands
Make sure positionals have `MultipleOccurrences` set rather than `MultipleValues`
Argument that requires command it is defined in is pointless (causes internal error)
Clap panics on broken pipe
[Derive] `#[doc = macro_name!()]` doesn't play well with doc comments
`value_name` appends, rather than overrides
When setting `value_name`, argument parsing fails
`min_values(0)` still complains about no value when combining short versions
Support for using ArgGroup as Enum with derive
`multiple_occurrences` behaviour does not match documentation
function `from_yaml` not found in `Arg<'_>`
subcommand names on windows are strange in help
support muti-arguments
Don't generate completions for args with AppSettings::Hidden
Uncontrolled recursion leads to abort in deserialization
value_of_t() is difficult to use with optional arguments
Bring back help_message and version_message
Document how to source completions
clap_derive casing change stringly type
Support non-Unix options (e.g. find -exec, bash +O shopt, cmd.exe /c, gcc -Wl,)
Configure help subsommand to print long form
"--version" Prints to standard output with `get_matches_safe()`
Unable to validate YAML config
Using index_of()/indices_of() with optional arguments that take optional values
Using subcmd field name in subcommand derive
Clap derive should parse markdown doc comment into normal text
Argument conflicts with subcommand name
Allow accessing the env name and default value when iterating over the arguments
A `require*` method that expressing `and(&&)` condition when requesting an argument
Get which arg of mutually exclusive ArgGroup was passed
bash tab completion confused when one subcommand is a prefix of another
bash tab completion for clap-generated subcommand CLI doesn't show subcommands after "foo help <TAB><TAB>"
Validate `conflicts_with`
Consider using idiomatic Rust errors
Setting help_heading causes default_value to be ignored for subsequent named arguments
Support command chaining
[regression] `cargo doc -p clap` doesn't provide useful docs
Argument names must be unique, but '' is in use by more than one argument or group'
Provide access to the original error for `ValueValidation` errors
Add inverse for required_unless
Examples don't work
required_unless not working with yaml
Optional positional arguments that get skipped if corresponding validation fails
#![deny(missing_docs)] incompatible with #[clap(flatten)]
Lines in help output can be wider than the terminal width
tag/release v2.33.2 in github?
Reduce compilation time
Create own error message in clap's style
Expand template macros found in Rust comments [feature request]
Rant: MultipleValues considered harmful
[Doc] Obscure behavior of Arg.multiple method
Use enum as subcommands in a subcommand
Specify the default --sort option in the configuration file
help_heading doesn't seem to work
Argument with default_values conflict when inside groups
Flag implies other flags
Better than display_order and DeriveDisplayOrder argument positioning
required_unless, required_unless_one, and required_unless_all for ArgGroup
Easily configurable license information
Allow the completed command to be an alias
clap_derive: support tuples as shortcut for number_of_values = N, different validators
Handle parsing vector of custom structures
Specify default text for optional arguments in help
clap_derive: support fixed arrays as shortcut for number_of_values = N
Add simple prompts
ignore extra macos parameter
Special characters not escaped for zsh completion script
global opts that take a value cannot be mixed with subcommand
Multiple subcommand categories / `help_heading`s
No argument validation on globals
How can I handle this case which requires any group
Add no_std compatibility
[feature request] customizable subcommand separator besides space
Partially parse args, capturing unknown args into a vec, rather than error
Ignore and save in vector unknow args
Better looking visible aliases for subcommands
the --version flag concatenates subcommands
Binary size could be smaller
Support excluding a subcommand from shell completion
Error message should reference the short not long when short is used as arg
Dynamic completion support
Conflicts don't propagate from the global level to the subcommand
No way to create a global template
Feature: add Arg::required_unless_all
Question/Feature request: Any way to do required_ifs "flags exists".
Multi valued flags and required argument do not work together very well
Feature Request: Override setting for groups
The help message offset is inconsistent
Lib Blitz Style Summary and Overhaul
Add JSON Export for App
Add support for automatic negation flags
Support automatic subcommands for completion
Show used values in "smart usage"
Allow adding "external argv"s to be parsed alongside/before command line
Support or document localization of messages and flags
© 2019 BoostIO, Inc.