-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Proposal: Interpret {{-*|--*}} in the client #13556
Comments
This has also been discussed in #13466 which is closed with a reason |
I don't see any closing statements about interpreting |
Do you want this syntax to actually be in the
I see you proposed that we could also fork the project to do this, to avoid breaking clients. But imo, this has far more downsides than upsides. For example:
Is there any rush to get something like this in? Why not leave it on the backlog until a time we want to do an incompatible overhaul of the syntax in a new spec version. (If such a time ever arises.) We're allowed to break compatibility sometimes, but there's no need to rush into it for a single change. tldr-pages is perfectly usable, and I'm not aware of any major complaints/demand regarding this, so it's probably worth leaving it on the roadmap. Overall, I'm not against the idea, just against rushing into the idea. Though I do think it's worth getting more insight from users to see if it's actually valuable to them in practice. (Maybe a poll on Mastodon?) In the end, the aim is to help people pick up the most common command-line arguments for tools they have installed, not to copy and paste commands blindly. I believe our current convention is to prefer long-form for that purpose, so users have more context on the command, which already achieves our goal quite well and is perfectly usable. |
We already use that syntax so only thing left is for the client to interpret it. This proposal is not about forking because it's not necessary. |
@SethFalco Thanks for the comment, the previous discussion was about introducing a separate file to track the long/short option examples separate from the page/examples but it was dropped due to the infeasibility and risk of breaking clients. The current discussion is a proposal to client specification to use our current |
Oh, I see! Sorry for missing the point there then, my fault!
I honestly didn't know we had such a use for that syntax. (Goes to show how inactive I've been.) I was under the impression For example: - Enable or disable remote administration:
`cupsctl {{--remote-admin|--no-remote-admin}}` Do we have a good way for clients to tell apart |
I totally forgot about the OR usage (thanks for reminding me of it xD), it's a valid use case for a lot of advanced pages. So I think clients implementing this flag/variable can distinguish it based on the presence of The original page implementation here can be |
For the initial implementation, I think it's safe to just make the detection as strict as possible. Only two options and only when one is has one hyphen and the other has two hyphens. |
We could also check the number of characters after |
Just throwing it out there. For the initial implementation we should still be as strict as possible and require one and two hyphens on each side. |
The character My only concern would be causing some pages for some commands with lots of options to become visually cluttered, reducing readability. As with our longform/shortform preference, I don't necessarily think this is a clear-cut thing. It's best down to people making their own judgement. If we can reasonably assume that a command may be used a large number of times (obvious example here could be Perhaps on other pages that are borderline we could adopt this tldr: the proposed long/short option syntax is used in other scenarios too. Could be useful as a convention though that doesn't require a client spec change to implement. Worth using judgement based on whether long/short or a combination of both arguments are worth showing in a tldr page while maintaining readability. |
Git pages. This all started with a pull request where I tried to convert git pages to longform
As said by @kbdharun this would be a configuration thing. It's an addition to existing functionality. |
Thinking more on this, we have multiple collaborators referring to this feature as We can use the syntax in this way internally if that's desirable, it still adheres to the idea of being an Part of the appeal to tldr-pages is its simplicity, and adding rules like this undermine that imo. Clients may choose to implement such an idea, but I don't think that scenario should be covered by our spec. I also like sbrl's take, to not use short/long-form alternatives everywhere, but more selectively. Maybe for commands that are used very often, or where the long-form variant brings more clarity to what the command does. |
Just want to point out not all applications follow Nuclei is such as example. See their usage section. |
This has actually been discussed before #5092 |
As discussed in #13466, this is to make it user configurable to show either longform or shortform options. It would allow for more pasteability. This would also be backwards compatible as we already use that notation. It would not break any existing clients.
The text was updated successfully, but these errors were encountered: