All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luciano Rocha <luciano@eurotux.com>
To: David Kastrup <dak@gnu.org>
Cc: git@vger.kernel.org
Subject: Re: git help error
Date: Tue, 4 Dec 2007 20:06:25 +0000	[thread overview]
Message-ID: <20071204200625.GA32717@bit.office.eurotux.com> (raw)
In-Reply-To: <863auiw86m.fsf@lola.quinscape.zz>

[-- Attachment #1: Type: text/plain, Size: 2133 bytes --]

On Tue, Dec 04, 2007 at 08:50:41PM +0100, David Kastrup wrote:
> Luciano Rocha <strange@nsk.no-ip.org> writes:
> 
> > On Tue, Dec 04, 2007 at 11:40:15AM -0800, Junio C Hamano wrote:
> >
> >> Having said that, I do not mind accepting a patch that prepends the
> >> nonlocal path to MANPATH in help.c::show_man_page().
> >
> > Actually, current man utilities locate the manual page by looking where
> > the executable is, if MANPATH isn't defined (tested in Linux and
> > Darwin).
> >
> > So, "unset MANPATH; man git-add" should be sufficient.
> 
> That only works for paths registered in /etc/manpath.config (or an
> equivalent config file depending on system/distribution).

Err, no. I doubt my ~/opt/noarch/.../...; ~/opt/`uname -i`/git/; etc.,
are pre-registered by my Linux distro or OS X 10.[45].

man man:
       If you specify the -M pathlist option, pathlist  is  a  colon-separated
       list of the directories that man searches.

       If  you  don’t specify -M but set the MANPATH environment variable, the
       value of that  variable  is  the  list  of  the  directories  that  man
       searches.

       If  you  don’t  specify  an  explicit path list with -M or MANPATH, man
       develops its own path list based on the contents of  the  configuration
       file /etc/man.config.  The MANPATH statements in the configuration file
       identify particular directories to include in the search path.
...
       In addition, for each directory in the command search path (we’ll  call
       it  a  "command  directory")  for  which  you do not have a MANPATH_MAP
       statement, man automatically looks for a manual page directory "nearby"
       namely as a subdirectory in the command directory itself or in the par-
       ent directory of the command directory.

So, according to the last paragraph, and assuming no -M argument and no
MANPATH environment variable are defined, man should be able to find the
manual pages for git commands if they're in PATH.

-- 
Luciano Rocha <luciano@eurotux.com>
Eurotux Informática, S.A. <http://www.eurotux.com/>

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-12-04 20:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04 16:26 git help error Aneesh Kumar
2007-12-04 17:55 ` Junio C Hamano
2007-12-04 18:33   ` Sergei Organov
2007-12-04 19:40     ` Junio C Hamano
2007-12-04 19:47       ` Luciano Rocha
2007-12-04 19:50         ` David Kastrup
2007-12-04 20:06           ` Luciano Rocha [this message]
2007-12-06 18:36       ` Sergei Organov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071204200625.GA32717@bit.office.eurotux.com \
    --to=luciano@eurotux.com \
    --cc=dak@gnu.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.