Exploring Click #3454
epage
started this conversation in
Show and tell
Exploring Click
#3454
Replies: 1 comment
-
Great to see this! Whenever you do more with coloring please explore https://github.com/Textualize/rich |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
TODO: Left off at options
This is a rough series of notes exploring whats interesting about Click, from a clap perspective so we can consider what we can learn or to keep more options in consideration when exploring solutions.
My hope is we can do the same with other respected non-Rust CLI arg parsers.
High Level
For goals, the ones that stand out for clap are
argparse
, they call out "argparse has built-in behavior to guess if something is an argument or an option. This becomes a problem when dealing with incomplete command lines; the behaviour becomes unpredictable without full knowledge of a command line. This goes against Click’s ambitions of dispatching to subparsers."For non-goals
is that it’s a liability for backwards compatibility. "
Terminology:
API
The first thing of note is it uses function attributes for its API, rather than struct/class attributes. fncmd explores that direction for clap.
Integrated types
Those of note:
Beta Was this translation helpful? Give feedback.
All reactions