-
Notifications
You must be signed in to change notification settings - Fork 348
doc: add detailed doc for enum descriptions. #825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
doc: add detailed doc for enum descriptions. #825
Conversation
} | ||
``` | ||
|
||
### Tips for Effective Enum Descriptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets cut this section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!
|
||
When your argument or option uses an enum type, you can provide detailed descriptions for each enum value that will appear in the help screen. This is especially useful when the enum cases represent complex concepts that benefit from explanation. | ||
|
||
### Basic Enum Value Descriptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use just one enum throughout this documentation, I think output format is a good example
ميه ميه اوكي
في السبت، ٤ أكتوبر ٢٠٢٥ ٧:٥٧ ص Rauhul Varma ***@***.***> كتب:
… ***@***.**** commented on this pull request.
------------------------------
In Sources/ArgumentParser/Documentation.docc/Articles/CustomizingHelp.md
<#825 (comment)>
:
> @@ -150,6 +150,150 @@ OPTIONS:
For an ``ExpressibleByArgument`` and `CaseIterable` type with many cases, you may still want to implement ``ExpressibleByArgument/allValueStrings`` to avoid an overly long list of values appearing in the help screen. For these types it is recommended to include the most common possible values.
+## Providing Descriptions for Individual Enum Values
+
+When your argument or option uses an enum type, you can provide detailed descriptions for each enum value that will appear in the help screen. This is especially useful when the enum cases represent complex concepts that benefit from explanation.
+
+### Basic Enum Value Descriptions
can we use just one enum throughout this documentation, I think output
format is a good example
—
Reply to this email directly, view it on GitHub
<#825 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BYB4MMVHG5KRUXLOLUY6JGT3V5HR3AVCNFSM6AAAAACIIHOZMSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTGMBRGU3TQMRXHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Implemented feedback, lmk what else I can do! |
Haha, thanks! هاي
في السبت، ٤ أكتوبر ٢٠٢٥ ١١:٠٠ م Louis Qian ***@***.***> كتب:
… *louisunlimited* left a comment (apple/swift-argument-parser#825)
<#825 (comment)>
Implemented feedback, lmk what else I can do!
—
Reply to this email directly, view it on GitHub
<#825 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BYB4MMTGFPRDYFBG5YN576L3WARO7AVCNFSM6AAAAACIIHOZMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNRYGUYDOMJSGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Adds some doc on usage with adding enum help texts. I also asked claude to add some helpful tips in there, but can remove them if it's too much.
Checklist