From owner-freebsd-current@FreeBSD.ORG Thu Aug 19 07:45:47 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFC0810656A3 for ; Thu, 19 Aug 2010 07:45:47 +0000 (UTC) (envelope-from gordon.tetlow@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 70DD68FC1A for ; Thu, 19 Aug 2010 07:45:47 +0000 (UTC) Received: by iwn36 with SMTP id 36so1802565iwn.13 for ; Thu, 19 Aug 2010 00:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=K4mbKYYUfmIxtEpZBVqBEbH1y+/zc5J1t7NOQfR4Dtw=; b=t2MILPv+lgEWfSZKdFLErXwAYZdibnQm7q22zUqkVArTjaPdJf4Ad02IrFrk6nXaTx dwPhGratZElv3kGeUOFzRf0i45zFV3+nhdHWBpcPAl5BMh4mthnIor+8K7ljwuuoE4Hj jm8oS4SewXF9VwPAtXiOWqJ/wbk9KWJOrThYI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=EYER46BeEwPrTCg7+oVDqqLQZiPBIn6hqXAKCaYviOwkxxK5P/ifD+Vrtq+vZwDJ5V UtbKXwkmpGsJ4Qhih4sugth/VvVjw76Y/81+BsO4nRGaVVbtvQ/Balc/PBvj2MERJxj3 31jhHmCGAPrK2DvaqHZcpDnXJn/MiJ7NPC3J0= MIME-Version: 1.0 Received: by 10.231.183.67 with SMTP id cf3mr10169740ibb.187.1282203946177; Thu, 19 Aug 2010 00:45:46 -0700 (PDT) Sender: gordon.tetlow@gmail.com Received: by 10.231.172.147 with HTTP; Thu, 19 Aug 2010 00:45:46 -0700 (PDT) In-Reply-To: References: <86sk2b79oi.fsf@gmail.com> Date: Thu, 19 Aug 2010 00:45:46 -0700 X-Google-Sender-Auth: kAitxL6k-E_rxBOo0CrFQNdNjEI Message-ID: From: Gordon Tetlow To: Anonymous Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-current@freebsd.org Subject: Re: CFR: Replace man/manpath/whatis/apropos with a shell script X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2010 07:45:47 -0000 On Wed, Aug 18, 2010 at 11:52 PM, Gordon Tetlow wrote: > On Wed, Aug 18, 2010 at 5:01 PM, Anonymous wrote: > >> Gordon Tetlow writes: >> >> It doesn't search in bin/../man nor in bin/.man. For example, >> my PATH contains $LOCALBASE/bin:$HOME/.bin, while /etc/manpath.config >> is default one and contains /usr/local/man which does not exist here. >> > > Guess I missed that pretty badly in my port. I'll go back and retool the > logic for this but that'll take a bit of time. > Added. Latest version at http://people.freebsd.org/~gordon/man.sh It's a slightly different heuristic than the existing man implementation since I don't support the notion of MANPATH_MAP. Here's the order: Default manpaths (/usr/share/man:/usr/share/openssl/man:/usr/local/man) Parse $PATH (path/man:path/MAN:(if ending in /bin)path/../man) Parse config files Thanks! Gordon