Comment by dmitriid

8 years ago

Yup, and the examples section is usually last, with no possibility to jump directly to it

> and the examples section is usually last

A far better answer to this would have been a project to (1) improve man page examples, and then (2) create a small alternative man page client that displays only the examples (or puts them up top).

Having said that I do see the need for what tldr is doing, even though I would have preferred it added to existing tools. More often than not I only find man pages useful after I have needed to look up something. They're usually OK for wholistic understanding, but often too dense and assuming of far too much contextual knowledge to be useful in the heat of battle.

You can jump to it by typing /EXAMPLES<enter>

Or if that seems like a lot of keystrokes, /EX<enter> will probably jump to what you want most of the time too.

  • "probably"

       > man less
    
       /EX
       pattern not found
    
       /ex
       ends up somewhere in the middle of the text 
       on a word that contains ex

> with no possibility to jump directly to it

How about '/examples'? Maybe you should take some time to actually learn how 'man' works before you start bashing it online...

    $ cat ~/.bin/eg
    #!/bin/bash
    man $@ | awk '/^EXAMPLE/ { getline; while ($0 !~ /^[A-Z]+/) { print $0; getline; } }'