Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Ross Boulet" To: Cc: "'Thorsten Kampe'" Subject: RE: Man not finding pages Date: Mon, 1 Mar 2004 21:59:49 -0600 Message-ID: <000701c4000a$da1ad100$6400000a@RossLap> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" In-Reply-To: <101pt278qc23z.dlg@thorstenkampe.de> X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i2240bo0015129 > > You. Man. Are. Genius. > Thanks, but you embarrass me. I just get lucky occasionally. I'm not an expert at man and I know next to nothing about zsh, but based on some personal observations, I think I can answer some of your questions about man and manpath. > Recently I posted http://article.gmane.org/gmane.os.cygwin/44906 but > found no answer or solution. Suddenly completion started to work again > but on the next day not even calling a single man page was found by > man because of the wrong $MANPATH. > > Now I corrected 'export MANPATH="${X11MANPATH}"' to 'export > MANPATH=":${X11MANPATH}"' in XFree86-man.sh and now everything is > okay. > > Thanks, Thorsten > > ,--- * MANPATH statements in /etc/man.conf > | MANPATH /usr/share/man > | MANPATH /usr/X11R6/man > | MANPATH /usr/local/man > | MANPATH /usr/man > `--- > ,--- * Cygwin host (where it "doesn't work") > | % echo $MANPATH > | :/usr/X11R6/man:/usr/ssl/man > | ^ see the empty path? ($manpath is "'' /usr/X11R6/man /usr/ssl/man") > | % manpath > | /usr/share/man:/usr/X11R6/man:/usr/ssl/man:/usr/man:/usr/local/man > `--- > ,--- * Linux host (where it "works") > | % echo $MANPATH > | /usr/share/man:/usr/local/share/man:/usr/share/gcc-data/i686-pc-linux-gnu/3. 3/man:/usr/ > | X11R6/man::/opt/sun-jdk-1.4.2.03/man:/usr/qt/3/doc/man:/opt/vmware/man > | % manpath > | zsh: command not found: manpath > `--- > /etc/zprofile and /etc/profile.d/zshell.zsh don't contain man > settings. When I manually do "export MANPATH=/usr/share/man" then zsh > does the man completion. > > My questions are (I know they might not be specifically Cygwin > related): > > 1. Where and how is $MANPATH assembled? It's a combination of things. In my case, I run the pdksh shell. MANPATH is set in /etc/profile and further modified by .sh scripts in /etc/profile.d. It looks to me like zsh runs the same scripts as part of /etc/zprofile. > 2. Where does the path that the "manpath" command shows come from? I'm not positive about this, but I believe manpath takes $MANPATH and, assuming $MANPATH has an empty path in it, adds any paths specified in the man.conf file, but eliminates any paths which do not actually have man pages. > 3. Why does $MANPATH and "manpath" output differ? I think manpath eliminates any paths which do not actually contain man pages (see previous answer) and adds paths from man.conf. > 4. Why is /usr/share/man not in $MANPATH? Because there is an empty path in $MANPATH, it is picked up from the man.conf file. > 5. Why is the first entry in $MANPATH empty? From my tests, an empty path, whether at the end or beginning or somewhere in between (::) is what tells man to include the paths from man.conf. If there is not an empty path, man and manpath use only what is in $MANPATH > 6. How and where can I fix this? Hopefully, this is done. HTH > Thanks to all that can help, > Thorsten -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/