From owner-freebsd-questions@FreeBSD.ORG Tue Apr 5 16:04:27 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B3AE106566B for ; Tue, 5 Apr 2011 16:04:27 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) by mx1.freebsd.org (Postfix) with ESMTP id 004638FC14 for ; Tue, 5 Apr 2011 16:04:26 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email2.allantgroup.com (8.14.4/8.14.4) with ESMTP id p35G4PBN046702 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Apr 2011 11:04:25 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.4) with ESMTP id p35G4PHl091251 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Apr 2011 11:04:25 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.4/Submit) id p35G4O2M091250; Tue, 5 Apr 2011 11:04:25 -0500 (CDT) (envelope-from dan) Date: Tue, 5 Apr 2011 11:04:24 -0500 From: Dan Nelson To: Michael =?utf-8?Q?Gr=C3=BCnewald?= Message-ID: <20110405160424.GB68973@dan.emsphone.com> References: <4D9B3403.2070704@yahoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4D9B3403.2070704@yahoo.fr> X-OS: FreeBSD 8.2-PRERELEASE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [199.67.51.78]); Tue, 05 Apr 2011 11:04:25 -0500 (CDT) X-Scanned-By: MIMEDefang 2.68 on 199.67.51.78 Cc: FreeBSD questions Subject: Re: Place to install library of shell functions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2011 16:04:27 -0000 In the last episode (Apr 05), Michael Grünewald said: > today I come to you with what seems to be somehow pedantic question: where > is the best place to install libraries of shell functions. > > I read hier(4) carefully and it seems the correct place for this would > be somewhere under `/usr/local/share': > > share/ architecture-independent files > > On the base systems, many macros (make templates and groff macros) are > actually installed under /usr/share. However, the only library of shell > functions I am aware of is `/etc/rc.subr', that landed on this funny > location, probably to be pretty sure that this library is on the same > filesystem as the scripts under /etc/rc.d. > > Several of the ports install shell scripts under `/usr/local/lib' that > hier(4) devotes to ``shared and archive ar(1)-type libraries''. These > shell scripts are: The zsh port installs all its helper scripts and functions into /usr/local/share/zsh , and the portupgrade and portmaster ports insert their zsh autocompletion functions into /usr/local/share/zsh/site-functions. Seems to work great. Ports that install scripts into /usr/local/lib probably either don't have separate script and lib install paths in their makefile (tcl probably), or their scripts aren't meant to be called directly (firefox). -- Dan Nelson dnelson@allantgroup.com