|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Programming/Scripting Questions about programming, bash scripts, perl, php, cron jobs, ruby, python, etc. |
![]() |
|
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
This is a very nice addition. I tested it on OS 10.3 with KDE 3.5.10 and on SLED 10 SP2 with Gnome 2.12.2. Both are stock installations. Colors are totally different (different machines, displays and systems), but no worries.
|
|
|||
|
Ok... and I suspect the reason it's not documented is because it is deprecated. Such settings would only work on one type of terminal and if you change to another type, the sequences would be wrong. Why not just set the terminal type and let less get the sequences from the termcap database? That's the way termcap is supposed to work.
|
|
||||
|
On Sat, 2009-05-23 at 05:16 +0000, LewsTherinTelemon wrote:
.... > Would you mind sharing your complete /etc/profile, .bashrc and what > versions of termap and less you are using? Actually, I didn't want man color... so I simply pasted the variable settings directly into my active shell to test. I think I did it from an 11.0 box... TERM=xterm, I was using a color capable terminal (konsole) and you do NOT need termcap, just terminfo, I'm using terminfo-5.6 |
|
||||
|
On Tue, 2009-05-26 at 15:11 +0000, cjcox wrote:
> On Sat, 2009-05-23 at 05:16 +0000, LewsTherinTelemon wrote: > ... > > Would you mind sharing your complete /etc/profile, .bashrc and what > > versions of termap and less you are using? > > Actually, I didn't want man color... so I simply pasted the variable > settings directly into my active shell to test. > > I think I did it from an 11.0 box... TERM=xterm, I was using > a color capable terminal (konsole) and you do NOT need termcap, > just terminfo, I'm using terminfo-5.6 You could make the argument that you don't even need terminfo... but that could be a big assumption. (so let's be safe) |
|
|||
|
Still think we are missing part of the puzzle on 11.1:
paracelsus@Callandor:~> echo $TERM $PAGER xterm less paracelsus@Callandor:~> sudo rpm -qa | grep term termcap-2.0.8-980.45 terminfo-base-5.6-89.10 xterm-236-1.50.1 xtermset-0.5.2-255.9 terminfo-5.6-89.10 Still do not have color man pages in 11.1 despite the above (and obviously exporting the termcap settings in /etc/profile or .bashrc) Something else has obviously changed in 11.1 but I can't quite narrow down what it is. Cheers, Pete |
|
||||
|
Solution!!
I tested in 11.1 and indeed, things don't work right. The difference... try this on 11.1... export GROFF_NO_SGR=yes Then see if things work (provided you have the LESS_TERMCAP_ entries set).
__________________
Linux is free. Life is good. |
|
|||
|
Nice find cjcox! I have never researched into the roff, troff, groff text formatting systems - pretty interesting. I also found the you can enable SGR in when using the less pager by just exporting it with the -R option - which I think should achieve the same as export GROFF_NO_SGR=yes however this fails in practice
From the grotty man page: " For SGR support, it is necessary to use the -R option of less(1) to disable the interpretation of grotty's old output format. Consequently, all programs which use less as the pager program have to pass this option to it. For man(1) in particular, either add -R to the $PAGER environment variable, e.g. PAGER="/usr/bin/less -R" export PAGER or use the -P option of man to set the pager executable and its options, or modify the configuration file of man in a similar fashion." And later: "ENVIRONMENT GROFF_NO_SGR If set, the old drawing scheme for bold and underline (using the backspace character) is active. Colors are disabled." (It is interesting to note how to color codes in the grotty man page are themselves displayed between exporting GROFF_NO_SGR=yes and PAGER=less -r Both show color, but interpret the ANSI color codes differently.) Problem indeed solved, export GROFF_NO_SGR=yes works very well - thanks for your input. Cheers, Pete |
|
||||
|
On Sat, 2009-05-30 at 03:06 +0000, LewsTherinTelemon wrote:
> Nice find cjcox! I have never researched into the roff, troff, groff > text formatting systems - pretty interesting. I also found the you can > enable SGR in when using the less pager by just exporting it with the -R > option - which I think should achieve the same as export > GROFF_NO_SGR=yes however this fails in practice > ....snippy... > > Problem indeed solved, export GROFF_NO_SGR=yes works very well - thanks > for your input. It's a mess.... for fun also try changing your TERM TERM=xterm-pcolor man ls You can uncompile using, TERM=xterm-pcolor infocmp and then create your own terminal def with the colors you like... of course it's universal at this point if you change your TERM... use tic to compile it (need ncurses-devel for that). |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|