feat: add -x flag to list commands exclusive to a platform#308
Open
Kausheya2006 wants to merge 3 commits intotldr-pages:mainfrom
Open
feat: add -x flag to list commands exclusive to a platform#308Kausheya2006 wants to merge 3 commits intotldr-pages:mainfrom
Kausheya2006 wants to merge 3 commits intotldr-pages:mainfrom
Conversation
Managor
reviewed
Dec 23, 2025
Member
|
Do not resolve issues if they are not resolved. |
Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
acuteenvy
reviewed
Jan 3, 2026
Member
There was a problem hiding this comment.
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?
Member
|
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 |
Member
There was a problem hiding this comment.
Suggested change
| -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.