Skip to content

Comment on Bro pages: like man pages, but with examples only

Comments

I humbly submit an implementation of `eg`. It solves the technical problem discussed here for a selection of programms (notably git!):

    alias eg='man --pager='\''less -p "^[A-Z]* ?EXAMPLES"'\'''
This obviously depends on the quality of the man-pages.

Witness: `eg git pull` (with a recent enough Bash, `eg git-pull` otherwise), `eg awk`, `eg cat` or even `eg man`.

Ironically, the curl man-page doesn't have a separate Examples section; the authors prefer to intersperse those throughout the text.

The name was coined here by imdsm[0] -- I had been using `examples` previously.

[0] https://news.ycombinator.com/item?id=7121505

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.