4 ms·
I humbly submit an implementation of `eg`. It solves the technical problem discussed here for a selection of programms (notably git!): alias eg='man --pag
by hf 13y 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.
[0] https://news.ycombinator.com/item?id=7121505 https://news.ycombinator.com/item?id=7121505