Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A revised fix for the apropros long-entry problem' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A revised fix for the apropros long-entry problem
Authored by: lihtox on Mar 23, '07 09:16:58PM
The previous fix mentioned changing apropos itself, so I played around with the new version of apropos and came up with the following apropos patch:

1. Right before the line while ["$1" != "" ], add the line width=`stty size |cut -d -f2`

2. After that line is a line that says if grep -"$grepopt1" "$grepopt2""$1" $d/whatis Add |cut -c1-$width to the end of that line.

Thanks for the inspiration!

[ Reply to This | # ]