Re: [SLUG] man pages without the colour

2005-12-03 Thread Daniel Bush
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 -bIt 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

[SLUG] man pages without the colour

2005-12-02 Thread Daniel Bush
Hi Folks,Does anyone have a way of turning off the wretched colouring used by the manpage system (specifically on debian) ?It conflicts with the colour backgrounds I'm using so, ironically, all the bits it is highlighting like titles are virtually unreadable -  it's like they assume everyone uses a white terminal or something.
Colour in manpages is one bit of progress I can do without.(I'm aware of nroff and groff and /etc/manpath.config; even tried to mangle their output using sed)Thanks,Daniel
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Re: [SLUG] man pages without the colour

2005-12-02 Thread Daniel Bush
On 12/2/05, Ken Foskey [EMAIL PROTECTED] wrote:
On Fri, 2005-12-02 at 20:14 +1100, Daniel Bush wrote: (I'm aware of nroff and groff and /etc/manpath.config; even tried to mangle their output using sed)try man xyz | lessman is context aware and if it not a console (ie pipe) it possibly will
not highlight.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' | lessand lo! crisp white manpages did materialise before me!Ugly hack though.(The ^H may or may not have something to do with the -c flag for nroff)Daniel.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Re: [SLUG] man pages without the colour

2005-12-02 Thread Matthew Hannigan
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.

Matt


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