-
-
Notifications
You must be signed in to change notification settings - Fork 99
Implement option length selection with options and environment variables #259
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
Conversation
Related issue tldr-pages/tldr#13556 |
Seems interesting. Does this always hold up with all instances of What would you envision the CLI to look like for |
What about tools that don't follow this convention for short and long options (e.g. tldr-pages/tldr#13556 (comment))? |
If a tool doesn't follow this convention then it won't be affected by this. Simple as that. |
This regular expression won't work if there are multiple short options in a single placeholder. `rsync {{-zvhP|--compress --verbose --human-readable --partial --progress}} {{path/to/source}} {{path/to/destination}}` |
That is by design. Like I said in the original issue, the initial implementation should be as strict as possible. EDIT: However. That example is pretty nice for condensing the shortform options. Maybe I should allow it to be picked up. |
Alright, I'm looking for feedback again. Is this the proper way to implement options? Also how can I implement TLDR_SHORTFORM and TLDR_LONGFORM env variables? |
Nvm figured it out. Now I'm just looking for feedback. |
I adjusted the client specs in tldr-pages/tldr#15253 and adjusted the code to match it. I'm looking for feedback. |
|
@kbdharun You seem to be fluent in manpage language. Would you be willing to make an addition to the tldr manpage after this goes through? |
Sure |
I implemented the final command line options seen in the release. I'm looking for feedback again. |
Co-authored-by: Lena <[email protected]>
@sebastiaanspeck I would like to write tests for option placeholders. Do you have any tips the process and where to start? |
This Python script has some tests https://github.com/tldr-pages/tldr/blob/main/scripts/_common.py |
Lets merge this. I tested manually that this works. I might write tests in a separate PR. Requesting reviews. |
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.
Initial ideas on how to implement the shortform/longform print modes.