-
-
Notifications
You must be signed in to change notification settings - Fork 109
feat: add -x flag to list commands exclusive to a platform #308
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?
Conversation
|
Do not resolve issues if they are not resolved. |
Co-authored-by: Managor <[email protected]>
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.
Per the client specification, --list must be platform-specific, and --platform must be respected for --list.
https://github.com/tldr-pages/tldr/blob/d9d444a6a01a0f8f6af46fa7836fe621fe295d47/CLIENT-SPECIFICATION.md#arguments
Option Meaning -p,--platformSpecifies the platform (including common) to be used to perform the action (either listing or searching) as an argument. If this option is specified, the selected platform MUST be checked first instead of the current platform as described below. -l,--listLists all the pages in the current platform to the standard output.
What is --exclusive for, then? To exclude common from the output?
|
Sounds mostly a developer option. It's to know if the page you pulled is from |
| -p PLATFORM, --platform PLATFORM | ||
| Override the operating system [android, freebsd, linux, netbsd, openbsd, osx, sunos, windows, common] | ||
| -l, --list List all available commands for operating system | ||
| -x, --exclusive Use with --list and --platform to list commands exclusive to the specfied platform |
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.
| -x, --exclusive Use with --list and --platform to list commands exclusive to the specfied platform | |
| -x, --exclusive Use with --list and --platform to list commands exclusive to the specified platform |
We have to use it along with --list -p
Example usage :
python3 tldr.py --list -p osx -x # it will list all commands available only for macosThis allows users to easily identify platform-specific commands.