Skip to content

Conversation

@Kausheya2006
Copy link

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 macos

This allows users to easily identify platform-specific commands.

@kbdharun kbdharun added the hacktoberfest-accepted PRs which are eligible for hacktoberfest but won't get merged before 31st label Oct 29, 2025
@kbdharun kbdharun self-requested a review October 29, 2025 00:22
@kbdharun kbdharun changed the title Added new flag : -x to list commands exclusive to a platform feat: add -x flag to list commands exclusive to a platform Oct 29, 2025
@Managor
Copy link
Member

Managor commented Dec 23, 2025

Do not resolve issues if they are not resolved.

Copy link
Member

@acuteenvy acuteenvy left a 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, --platform Specifies 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, --list Lists all the pages in the current platform to the standard output.

What is --exclusive for, then? To exclude common from the output?

@Managor
Copy link
Member

Managor commented Jan 3, 2026

Sounds mostly a developer option. It's to know if the page you pulled is from linux or common to know if it should be moved

-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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PRs which are eligible for hacktoberfest but won't get merged before 31st

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants