-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
docs: add section on combining short options #3179
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: stable
Are you sure you want to change the base?
docs: add section on combining short options #3179
Conversation
Add documentation explaining the standard POSIX behavior of combining short options (e.g., -abc is equivalent to -a -b -c). This section includes: - Explanation of short option combining with examples - Example showing value attachment to combined options - Note clarifying that multi-character short options are not supported Closes pallets#2779 --- Ahmed Adel Bakr Alderai
|
|
||
| Short options that consist of a single character can be combined into a | ||
| single argument. For example, `-a -b -c` can be written as `-abc`. This | ||
| is standard POSIX behavior and applies to any short options, including |
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.
change to single short option
|
|
||
| ```{note} | ||
| Multi-character short options are not supported. An argument like `-abc` | ||
| is always interpreted as the combination of `-a`, `-b`, and `-c`, not as |
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.
remove always
| is always interpreted as the combination of `-a`, `-b`, and `-c`, not as | ||
| a single option named `-abc`. If you need longer option names, use long | ||
| options with `--` prefix instead (e.g., `--abc`). | ||
| ``` |
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.
should read: with the -- prefix
|
Great pr, with a few minor things to fix! Also please rebase onto stable. |
Summary
This PR adds documentation for short option combining behavior, as requested in #2779.
Changes
New "Combining Short Options" section in
docs/options.md:-abc=-a -b -c)Changelog entry added to
CHANGES.rstPer maintainer request
Following @Rowlando13's guidance in the issue:
Closes #2779
Ahmed Adel Bakr Alderai