On 12/3/05, Matthew Hannigan <[EMAIL PROTECTED]> wrote:
On Fri, Dec 02, 2005 at 10:13:03PM +1100, Daniel Bush wrote:
> Thanks Ken.
> I forgot about directly piping it like that.
> But I still got the colour in less.  I was stumped for a while before trying
> my famous sed mangling-script again:
>     man xyz | sed -e 's/.^H//g' | less
> and lo! crisp white manpages did materialise before me!
> Ugly hack though.

I think the standard thing to use is

        col -b

It has roughly the same effect as that sed.

Yup.  That's neater.  Thanks.
So my current solution is to re-write man using a bash function which I've put in my .bash_profile file:
---
function man() {
        if [ -z "$1" ]; then
                echo "No arguments provided." >&2
        else
                /usr/bin/man $* | col -b | less
        fi
}
---

Cheers,
Daniel
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to