Comment by hf
11 years ago
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.
No comments yet
Contribute on Hacker News ↗