Re:Simplified and community-driven man pages
by kleiba on Sunday November 26, 2017 @05:46PM
(#15783526)
Sure, you're right, it's not the same thing. I just gave a simple example of something that's close, but I'm not even using a bash function like that myself. If I did, though, I guess the 8th occurrence wouldn't be so bad in my book, since the results can be scanned rather quickly.
You could always make your function more clever, e.g.:
function mano() {
man "$1" | grep -A1 -- "$2\\b"
}
or
function mano() {
man "$1" | grep -A1 -- "$2 "
}
but most probably, you will still run into edge cases that won't work properly. For instance, only one of the two versions above still works with "test -e".
You could always make your function more clever, e.g.:
or but most probably, you will still run into edge cases that won't work properly. For instance, only one of the two versions above still works with "test -e".