tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: tech@mdocml.bsd.lv
Subject: Re: MANPATH and overriding/modifying default paths.
Date: Sun, 25 Dec 2011 00:36:12 +0200	[thread overview]
Message-ID: <4EF653DC.3010502@bsd.lv> (raw)
In-Reply-To: <20111224221429.GF15148@iris.usta.de>

>> A while back, I complained to Ingo that MANPATH is heavy-handed: it
>> doesn't allow us to modify the default search path (in, e.g.,
>> /etc/man.conf), but only override it.
>>
>> He mentioned that in manpath(1) used on systems, MANPATH can modify
>> instead of override by placemen to colons.  To wit:
>>
>> MANPATH
>>      If $MANPATH is set, manpath displays its value rather than
>> determining it on the fly. If $MANPATH is prefixed by a colon, then
>> the value of the variable is appended to the list determined from
>> the content of the configuration files. If the colon comes at the
>> end of the value in the variable, then the determined list is
>> appended to the content of the variable. If the value of the
>> variable contains a double colon (::), then the determined list is
>> inserted in the middle of the value, between the two colons.
>>
>> The enclosed patch does just this for apropos(1), whatis(1), and
>> catman(8) (which is also updated with -C like the others).  I
>> modified the explanation above to be (I hope) a little clearer as to
>> precedence.
>
> Yes, your wording is better, very clear and concise.
>
>> Objections?
>
> First, i misread your patch.  You changed the #else clause of
> the cpp(1) alternative, not the #ifdef clause.  Thanks for
> pointing that out once again.
>
> Then, i hesitated for some time whether we really want this,
> but came to the conclusion that we have MANPATH anyway, it does
> not change MANPATH semantics that much, the proposed use case
> makes sense, i could not come up with a better solution, and it
> improves compatibility a tiny bit.
>
> So i have tweaked it and committed it to OpenBSD.
> At the expense of three additional lines of code -
> actually, all of them closing braces - i got rid of two
> local variables, made the code flow much more obvious
> and got the oportunity of inserting eight comments.
>
> While here, i have also put back -m (which got lost)
> and copied Linux semantics of treating an empty MANPATH
> the same way as an undefined MANPATH, which obviously
> is more useful than returning empty results.
>
> Feel free to merge to bsd.lv, or tell me to do it;
> conflict resolution will be trivial.

Ingo,

I'm checking this in right now, applying the apropos(1) updates to 
whatis(1) and catman(8).

Thanks for looking this over!

Kristaps

--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

      reply	other threads:[~2011-12-24 22:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-18 14:52 Kristaps Dzonsons
2011-12-18 15:08 ` Kristaps Dzonsons
2011-12-18 19:09   ` Ingo Schwarze
2011-12-18 19:50     ` Kristaps Dzonsons
2011-12-24 22:14 ` Ingo Schwarze
2011-12-24 22:36   ` Kristaps Dzonsons [this message]

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=4EF653DC.3010502@bsd.lv \
    --to=kristaps@bsd.lv \
    --cc=tech@mdocml.bsd.lv \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).