View previous topic :: View next topic |
Author |
Message |
Timmer Guru
Joined: 24 Aug 2004 Posts: 373 Location: Duluth, MN, USA
|
Posted: Mon Nov 30, 2009 12:50 pm Post subject: Crazy man output [solved] |
|
|
I tried to look at a man page the other day, and this is what I got:
Code: |
ESC[1mNAMEESC[0m
cp - copy files and directories
ESC[1mSYNOPSISESC[0m
ESC[1mcp ESC[22m[ESC[4mOPTIONESC[24m]... [ESC[4m-TESC[24m] ESC[4mSOURCEESC[24m ESC[4mDEST
ESC[0m
ESC[1mcp ESC[22m[ESC[4mOPTIONESC[24m]... ESC[4mSOURCEESC[24m... ESC[4mDIRECTORYESC[0m
ESC[1mcp ESC[22m[ESC[4mOPTIONESC[24m]... ESC[4m-tESC[24m ESC[4mDIRECTORYESC[24m ESC[4mSOURCEESC[24m...
...
|
When I googled, I only got stuff about a bug with non-English UTF encoding. But I'm using English, so that's not my problem. So I'm stumped. Does anyone know how I can make my man pages readable again?
Last edited by Timmer on Wed Dec 02, 2009 3:54 am; edited 1 time in total |
|
Back to top |
|
|
marduk Retired Dev
Joined: 20 Sep 2002 Posts: 78
|
Posted: Mon Nov 30, 2009 2:10 pm Post subject: |
|
|
Those are escape sequences. Your pager should be able to know what do do with them. What are you using as your pager? |
|
Back to top |
|
|
Timmer Guru
Joined: 24 Aug 2004 Posts: 373 Location: Duluth, MN, USA
|
Posted: Mon Nov 30, 2009 3:08 pm Post subject: |
|
|
I have no idea. How do I find out? |
|
Back to top |
|
|
ndse2112 Tux's lil' helper
Joined: 21 May 2007 Posts: 100
|
Posted: Mon Nov 30, 2009 3:19 pm Post subject: |
|
|
|
|
Back to top |
|
|
Timmer Guru
Joined: 24 Aug 2004 Posts: 373 Location: Duluth, MN, USA
|
Posted: Tue Dec 01, 2009 12:17 am Post subject: |
|
|
Oh. Hmm. It appears to be unset. That would probably be the problem. But unfortunately, I'm still in the dark. Google has told me that 'less -is' is the default, but it seems like I want to over ride that. It do that in /etc/man.conf apparently, but it doesn't tell me what other possible options would be. Suggestions? |
|
Back to top |
|
|
haarp Guru
Joined: 31 Oct 2007 Posts: 535
|
Posted: Tue Dec 01, 2009 10:35 pm Post subject: |
|
|
Just put
into ~/.bashrc and you're done. But I'd recommend emerging 'most' instead of less. Does colorful manpages, much easier to read |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9691 Location: almost Mile High in the USA
|
Posted: Wed Dec 02, 2009 1:28 am Post subject: |
|
|
If you're using less, you need to set your environment variable for less(1) options ("LESS") to include -R if it's not already set (this is due to a change that Gentoo devs did to switch from old/traditional man/nroff overstrike method to ANSI, to "get with the times" (and make it easier to search)) :
(for bourne shells:)
Code: | LESS=-R; export LESS |
This is becoming a FAQ... but... how would someone search for this problem? heh... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Timmer Guru
Joined: 24 Aug 2004 Posts: 373 Location: Duluth, MN, USA
|
Posted: Wed Dec 02, 2009 3:53 am Post subject: |
|
|
ah. I figured we couldn't have gotten to the root of the problem yet. But I bet that's it.
I set PAGER to less, but that didn't do the trick. Then I set it to more, and that made things readable again. When I came back here to report that, I read the above post, and tried less -R. That works too.
Still going to try most, because it intrigues me. (Also, OT, but wondering what the next one after most will be called... mostest?) |
|
Back to top |
|
|
Mike Hunt Watchman
Joined: 19 Jul 2009 Posts: 5287
|
Posted: Wed Dec 02, 2009 7:31 am Post subject: |
|
|
Strange that you don't have these 2 files Code: | # cat /etc/env.d/99pager
# Configuration file for eselect
# This file has been automatically generated.
PAGER="/usr/bin/less" |
Code: | # cat /etc/env.d/70less
LESSOPEN="|lesspipe.sh %s"
LESS="-R -M --shift 5" |
You can always try eselect pager list/set to set your pager. |
|
Back to top |
|
|
Timmer Guru
Joined: 24 Aug 2004 Posts: 373 Location: Duluth, MN, USA
|
Posted: Wed Dec 02, 2009 12:29 pm Post subject: |
|
|
I didn't have the first one, but I do have the second. Am I correct in guessing that it's supposed to be defining default options for less? Because it doesn't seem to be doing that. |
|
Back to top |
|
|
|