disable
subcommands / flags, to the tune of hide
in derive
mode
#5251
Labels
C-enhancement
Category: Raise on the bar on expectations
Please complete the following tasks
Clap Version
4.4.7
Describe your use case
Imagine a CLI shipped to multiple environments (i.e. both development servers and laptops). Some features (i.e. subcommands) only make sense in one or the other environment. I'd like to disable (instead of hide) the irrelevant subcommands. The condition is not (cannot be)
const
.Describe the solution you'd like
Instead of
I'd love to write
Alternatives, if applicable
const
. Even if it was, it'd mean we'd need conditional compilation around both the definition of the enum item, and also every place the enum value is used, which is not great ergonomically.Additional Context
No response
The text was updated successfully, but these errors were encountered: