The man pages are community driven, too. If you think they can be improved, instead of investing in rapidly decaying third-party documentation, please take your improvements upstream. The maintainers would be thrilled to have them.
The man pages are community driven, too. If you think they can be improved, instead of investing in rapidly decaying third-party documentation, please take your improvements upstream. The maintainers would be thrilled to have them.
Man pages are a reference/spec on all options and parameters, aimed at those who already have use a tool/technology/concept.
This is something different. It's a tutorial of how to do the most common things using that tool.
It's a bit like learning a programming language: would you read the formal spec, or would you learn from code examples?
Unless you've read formal specs for other languages with a similar paradigm before, it's way easier to learn from examples first, which gets you to the level of understanding where the formal specs start to make sense.
Improvements to man pages should be made, but not at the cost of beginner-friendly projects.
I agree, but I'm also painfully aware of man page incompleteness every time I'm on a non-OpenBSD system. I'd be grateful to anyone who chipped away at proper tagging for any GNU software. One should be able to :t to jump to the reference for any flag.
For tagging, the formatting would need to be redone to be mdoc, which breaks both the OSes mentioned above and would be an immensely arduous task at this point. Probably not going to happen.
Note GNU and and the Linux man-pages project are mostly outliers; everyone else that lives in BSD/illumos land has long since moved on to mdoc since like the 80s. See also https://www.usenix.org/system/files/login/articles/141-dzons...
Sudo supports such systems even though its manuals are written in mdoc.
The source tarball contains both the original mdoc manuals and man manuals, autogenerated by mandoc (https://mandoc.bsd.lv) which can convert mdoc to man—easy to do, since mdoc is a semantic format.
Then at build time one format or the other will be installed depending on how capable the system manpage formatter is.
Any project using mdoc pages could do the same thing. Projects using autotools could even copy Sudo’s autoconf macros for this.
I don't see why they could not serve both purposes.
Man pages should start with a tldr section followed by the full reference/spec.
Looking at some examples of tldrs, it mostly boils down to the most common use cases as examples. So well written man pages already have an "examples" section, and that really helps!
Many man pages contain examples and common usages. See for example the rsync man page, with complete examples of how to backup common file systems.
An examples section in a manpage is a fine idea which I would certainly encourage, but that wouldn't render tldr obsolete.
It might not be crazy to move the examples section to the top, since it would more quickly provide what most readers are looking for: a sample command line to tweak. Anyone who is genuinely looking for what a particular flag does is just going to search for it anyway, so it doesn't really matter if that flag appears on the 24th screen instead of the 23rd.
I know you can disable the pager for man, but the typical manpage is going to be fairly long anyway so the pager is generally desired. I suppose you could pipe man through head to just print out the first section, but honestly tldr seems to fill this niche better than I see that working.
In fact, having pages I don't need just causes confusion.
Moreover, commands can have system specific names.
Also my tdlr-pages checkout is only 19MB, so I'm not too concerned about bloat. I'm not really sure how having tldr's for irrelevant commands would be a problem, maybe with some shell autocompletions? Maybe there is a way you could prune the tldr-pages checkout?
I guess all I can really say is tldr works really well for me and I like it a lot. Nothing is perfect, but tldr is quite nice despite some warts.
Also, a gentle, human oriented intro can be a part of man page I think.
While some man pages have examples, I don't know if man page writers see their job as teaching readers how to use a utility. The goal of man pages more often seems to be _reminding_ a person already familiar with the tool how to use a tool.
I'm, umm, _reminded_ of project READMEs. I've come to assume that when I go to a project on GitHub, I'm going to get everything I need (or pointers to everything I need) to get started with a project, but often there's a project web site that is intended to serve that purpose. I just ran into this yesterday with Falcor.
Not all man pages are like this obviously. Specifically, the section three man pages on C functions do a good job fully documenting functions.
At the same time, that means a TL;DR type page is also likely to be useless. For the vast majority of software run from a shell, a man page is sufficient, and examples can be (and often are) added to good effect.
I will note that some projects split very large man pages into sub-pages, and that can work well. For example, ip, and much of the man pages on BSDs that explain how different technologies are implemented (for example, follow the references in the man page for ifconfig on OpenBSD).
The focus has been making it easier for the developers to write literally anything. One thing uses sphynx another uses man another uses doxygen or what the hell ever. Users aren't developers. This is why everyone ends up on google and ends up on stackoverflow or random blog or watching youtube.
The barrier to entry is much lower with some simple markdown thing. Hell, I was thinking about how to abuse this thing to make my own notes about commands.
If I remember correctly, when we instrumented the docs we found that the VAST majority of users skipped over all the descriptions and parameter definitions, and jumped straight to the examples of usage. Turns out observation is the fastest way to learn/remember. We redoubled our efforts to include examples of more obscure usage patterns, rather than relying on wordy explanations.
Because the man-pages project that he maintains provides the largest set of third-party manpages (outside the project trees themselves). The majority of manpages live either in the project they document or in the man-pages project.
> I don't know why this has to be met with so much friction.
The point of this thread is that it will often not be met with friction. Examples should be in a combination of the summary and examples sections of the manpages. (Distinct modes of operation belong in the summary, more fine-grained examples go in the examples section.
But they don't necessarily know best what usage patterns work well for people who are not maintainer-level experts.
I see a strong case for having separate texts for documenting the interface (striving for completeness and low redundancy) and introductory teaching. I don't think that I'd like seeing each man page prepended with a wordy ELIF and two pages of trivial examples. And I'm not saying this because I'd not need the ELIF, quite the opposite, I just don't think that it would be wise to mix them.
Having them maintained in one place, passed through the same distribution channels and available on the command line, now that would great of course. The minimum almost-requirement for a crowdsourcing effort for that content could be a contribution licence that is 100% compatible with the real thing, not 99%, not 99.99. Just in case.
Have you tried talking to any of the projects?
1. Including tar -cf and tar -xf probably the two you want to run in most cases. See: https://linux.die.net/man/1/tar
Would they?
The tldr.sh site prominently offers a sample of usage examples for a command; tar specifically. If one checks the tar man page there are no examples. This is policy, apparently promulgated by GNU et al. in favor of "info". I haven't the time right now to hunt down the official position, but here[1] is a SO discussion.
Should this TLDR thing correct that long standing mistake I'm all for it. Also, info is one of the most hostile TUI programs I've ever encountered and I resent using it.
[1] https://unix.stackexchange.com/questions/306189/why-dont-man...
And when I shell into an OpenBSD server their man page for tar has several examples at the bottom of the page.
Man, IMO, is a lot like Linux distros in that they are not all created equal, pull from a lot of different sources and can be inconsistent if you're not looking at the correct ones for whatever system you are on.
I too think TLDR is a good idea but that's no reason not to encourage that some of their work be ported back to man pages in their examples' sections.
1.23 March, 2012: no examples (RHEL 6)
1.26 March, 2015: no examples (OpenSUSE 13.1)
1.26 February, 2016: no examples (CentOS 7)
1.29 March, 2016: limited examples (Ubuntu 1804)
The last has no actual "EXAMPLES" section in the man page; only some incidental examples appearing among a discussion of "Option styles." I suspect this is also what you see; it's in the same position in the page. So there is some evidence that examples aren't entirely prohibited in GNU man pages, at least in recent years. Progress, I guess. The latest work on this man page (release 1.32) shows no further progress.TLDR goes well beyond those incidental examples and is far closer to what I'd hope to see; first class, worked example forms eagerly supplied. Without suffering info.
For what it's worth the Slackware page does have an Examples section so it's not exactly what your seeing on Ubuntu but the examples themselves may be the same. As mentioned there are only three but they are probably the three examples needed most by 95% of users.
And, since I wasn't clear in my previous post, I absolutely agree about info. It may have been a nice thought when hypertext based systems were young and new things needed to be tried but it should have quietly died by now IMHO.
* https://www.freebsd.org/cgi/man.cgi?query=tar#EXAMPLES
* https://man.openbsd.org/tar#EXAMPLES
* https://illumos.org/man/1/tar#examples
* https://www.ibm.com/support/knowledgecenter/ssw_aix_72/t_com...
* http://osr507doc.sco.com/cgi-bin/man?mansearchword=/usr/man2...
You are clearly very limited in your user manuals. (-:
(and one currently can't, given the unmodified man page from the most recent 1.32 release)
Whether documentation gets read or not probably depends on its Google ranking more than anything.
Something definitely can't be both first-party and community.
Remember, these are the same people that claim the Emacs and Vim are better to code in, and that IDEs are for inexperienced/lazy coders.
With a man page you know you're getting the right info because it came bundled with the tool.
If I type "man ps" I see
Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)
* ps (1)
ps (1p)
Man: What manual page do you want?
What if I instead saw Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)
* ps (1)
ps (1.tldr)
ps (1p)
Man: What manual page do you want?
where the man command retrieved that information from the TLDR-pages site?In the last years we have seen many innovative Rust re-implementations of classical commands such as cat, find, grep. Maybe the man command is next up?
However, realistically at the moment I don't see man pages competing with the spirit of tldr/bro/whatever, and I suspect that PRs geared towards making them compete would in fact be rejected by most projects.
Since they don't, we use bropages, tldr, etc.