Live data from Hacker News

Simplified and community-driven man pages

tldr.sh

91–100 of 169 posts

Re: Simplified and community-driven man pages

#91

Earlier quoted context omitted.

The traditional structure of man pages (Synopsis, Description, Options, and maybe Examples at the end) is just Bad. No documentation expert would write doc this way, not even as a reference, say nothing of a tutorial. The synopsis typically lists a bunch of command-line variations with literally no context, not even a line of commentary to tell the difference between the variations. Then comes a description, which is…

Man is like javadocs: useless unless you already know what you are doing, and then usually a wordy paraphrase of the method signature :( Even as a reference manual, man is bad though. If I'm looking for option "-e" of the test command, why can't I do $ man test -e -e file True if file exists (regardless of type). That seems more efficient, more unix-friendly and not too much to ask. I get this is an historical tool t…

De gustibus non est disputandum.

I've found javadocs enormously helpful when I was learning Java 20 years ago. But then again, I also like man pages and use them a lot.

If I'm looking for option "-e" of the test command, here's what I would do:

    $ man test
and then "/-e". Searching within a document is a commonly required skill in so many situations that I don't even think twice when applying it in man pages.

Of course, you could also just define a bash function for the functionality you're after like so:

    mano() {
        man "$1" | grep -A1 -- "$2"
    }
and then do

    $ mano test -e
or something along those lines.

Re: Simplified and community-driven man pages

#92

Hilariously, ITT are lots of comments saying that man is awful, in response to a pot about a "simplified and community-driven" alternative. Breaking news: man pages are community-driven already. You can make them better in your distro of choice. The BSD projects are a little better IMHO at this than Linux because each project has a dedicated team trying to raise the bar and make their docs better than the next distro…

>So don't make it simplified, don't hail "community-driven", just go and start making suggested changes with the rest of your favourite OS community!

Good luck with getting those accepted, when there's an established man page and for 30+ years simple examples like in tldr where frowned upon in almost all of them.

Re: Simplified and community-driven man pages

#93
post #47
post #27

Earlier quoted context omitted.

tar wouldn't be able to figure out to use pixz instead of xz in this case just using implicit deduction. I don't really type those options, but use some simple wrapper scripts :) Something like pixzcompress / pixzextract. Scripts also take care to differentiate between directory and a single file.

If you're OK with wrapper scripts, take a look at dtrx[0]. It can extract many different formats, so assuming you have the tools already installed, extracting anything can be done with `dtrx `. [0]: https://brettcsmith.org/2007/dtrx/

Interesting, but pixz is too new for it, plus it looks like it's using extension to determine the type, so it won't work for the same reason as above. The benefit of pixz is much faster compression / decompression.

Re: Simplified and community-driven man pages

#94
post #84

Hilariously, ITT are lots of comments saying that man is awful, in response to a pot about a "simplified and community-driven" alternative. Breaking news: man pages are community-driven already. You can make them better in your distro of choice. The BSD projects are a little better IMHO at this than Linux because each project has a dedicated team trying to raise the bar and make their docs better than the next distro…

People who complain about man pages tend not to understand man pages. Man pages aren't howto documentations. They're very specifically designed to document the different components of a command, call or configuration file. OP is absolutely spot on about man pages being community driven. At least half the time someone complains to me about a man page, the man page is the wrong place to look. Usually, the answer they'r…

>People who complain about man pages tend not to understand man pages.

That's their very issue with them.

>Man pages aren't howto documentations. They're very specifically designed to document the different components of a command, call or configuration file.

Then people who designed man pages didn't understand what the users want first and foremost: howto examples.

Besides, whether they document "the different components of a command" and whether they have howto examples is orthogonal. They could do all the formal documentation they want and still include howto examples.

That they don't (well, most don't, some man pages are decent enough to indeed include example sections) is their failure.

Re: Simplified and community-driven man pages

#95
Thank you, TLDR authors for this tool. It solves a real problem and can coexist with traditional man pages.

I may have missed it in the discussion already, but would it be possible for TLDR to favor editable online sources for its content (e.g.: WordPress/Mediawiki with Markdown)? This Wikipedia style of editing may be a big game changer.

Caveat: Of course, content would have to be packaged locally for offline use.

Re: Simplified and community-driven man pages

#97
post #92

Hilariously, ITT are lots of comments saying that man is awful, in response to a pot about a "simplified and community-driven" alternative. Breaking news: man pages are community-driven already. You can make them better in your distro of choice. The BSD projects are a little better IMHO at this than Linux because each project has a dedicated team trying to raise the bar and make their docs better than the next distro…

> So don't make it simplified, don't hail "community-driven", just go and start making suggested changes with the rest of your favourite OS community! Good luck with getting those accepted, when there's an established man page and for 30+ years simple examples like in tldr where frowned upon in almost all of them.

https://tldr.ostera.io/tar

https://man.openbsd.org/tar#EXAMPLES

What they're covering is just the examples section of a traditional man page. What makes you think people wouldn't merge these?

Re: Simplified and community-driven man pages

#100
It would be very nice to have some way of integrating this into OhMyZSH as a plugin. OMZ can already do extraction of command line arguments by tab completion (and it will attempt to make a brief description of what the flag does) [0][1].

It might be nice to be able to type "tldr compress a folder into a tarball" and click tab to have a set of templates suggested to you. You can navigate to them and click enter to replace your current command line contents with the template.

[0] - https://i.imgur.com/qFnvvaU.png

[1] - https://i.imgur.com/usOwgw2.png

Post reply on HN