Closed dbrgn closed 2 years ago
Discussion in https://github.com/tldr-pages/tldr/issues/7528 and https://github.com/tldr-pages/tldr/pull/7561 is still ongoing, but I'll remove this from the milestone: This definitely isn't one of the important compatibility issues we're having.
Closing for now.
This is the third part of #209.
The goal is supporting the special
all
platform that results in pages for all platforms being listed when calling--list
. It's part of the tldr client specification.However,
All
should not be a variant of thePlatformType
enum, becauseCurrent
isn't aPlatformType
either. Thus, we accept the stringall
but convert it into the current platform when parsing.For consistency, the same is done when no platform is specified, by introducing yet another possible value
current
which is used by default. This way, we get rid of theOption
.Due to limitations in clap, we had to remove the
requires = "command"
requirement, however that's actually a good thing because--list
does not require a command either, but supports the--platform
parameter.To simplify handling of os / platform arguments, a conflict between
--platform
and--os
was introduced.