Skip to content
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

avoid documenting examples related to: -h & --help #6153

Closed
mfrw opened this issue Jun 21, 2021 · 10 comments
Closed

avoid documenting examples related to: -h & --help #6153

mfrw opened this issue Jun 21, 2021 · 10 comments
Labels
decision A (possibly breaking) decision regarding tldr-pages content, structure, infrastructure, etc. mass changes Changes that affect multiple pages.

Comments

@mfrw
Copy link
Member

mfrw commented Jun 21, 2021

As discussed in #6145 discussion.
Should we refrain from documenting the obvious -h & --help examples ?

@mfrw mfrw added decision A (possibly breaking) decision regarding tldr-pages content, structure, infrastructure, etc. mass changes Changes that affect multiple pages. labels Jun 21, 2021
@bl-ue
Copy link
Contributor

bl-ue commented Jun 21, 2021

+1 because --help, -h, & /? are very common. They also take up space that could be used for other examples, and at a minimum they increase cognitive load.

@marchersimon
Copy link
Collaborator

I think we should only include it when it's not obvious. The cases I can think of where it would make sense:

  • When each subcommand has its own help
  • When it's not the default -h or --help
  • When you want to refer to something in the help, e.g. "List all available formatting options:"

@mfrw
Copy link
Member Author

mfrw commented Jun 22, 2021

I did some quick and dirty analysis. A very crude estimate:

(tldr-root) $ rg ' \--help' | wc -l
122
(tldr-root) $ rg ' \-h' | wc -l
183

Should we start with a couple of examples and see how it goes ?

@sbrl
Copy link
Member

sbrl commented Jun 22, 2021

I agree with @marchersimon's suggestions. Sounds like a good idea to review this, but on a case-by-case basis.

@CleanMachine1
Copy link
Member

Here's my opinion.

Keep it, and let all future --help commands be used. However they should always be prioritised to be removed if a better example is available.

There is no harm in having it, other than making the page a little longer (3 lines)

@marchersimon
Copy link
Collaborator

Making the page a little longer can be problematic, since our goal is to provide as short documentation as possible.

@CleanMachine1
Copy link
Member

Most pages already go over the default terminal size for me.
I don't know about others usage of tldr.

Its not like we document EVERY detail. Its just an easy thing to add, and could add something if someone doesn't know the --help/-h flag, if they are new to *nix

@sbrl
Copy link
Member

sbrl commented Jul 2, 2021

I say don't actively go looking through all existing pages and removing it, but consider it on case-by-case basis as it comes up as to whether it adds any value. e.g. on the nmcli page it's valuable to indicate that it also lists all subcommands.

@CleanMachine1
Copy link
Member

close?

@mfrw
Copy link
Member Author

mfrw commented Jul 5, 2021

Yep .. if all are in agreement .. lets close this one :)

@mfrw mfrw closed this as completed Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decision A (possibly breaking) decision regarding tldr-pages content, structure, infrastructure, etc. mass changes Changes that affect multiple pages.
Projects
None yet
Development

No branches or pull requests

5 participants