From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11440 invoked from network); 3 Jan 2003 09:15:23 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 3 Jan 2003 09:15:23 -0000 Received: (qmail 8383 invoked by alias); 3 Jan 2003 09:15:12 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5637 Received: (qmail 8365 invoked from network); 3 Jan 2003 09:15:11 -0000 Date: Fri, 3 Jan 2003 10:14:43 +0100 From: Roman Neuhauser To: zsh-users@sunsite.dk Subject: Re: Proposed changes to _bsd_pkg -- request for comments Message-ID: <20030103091443.GQ348@freepuppy.bellavista.cz> Mail-Followup-To: zsh-users@sunsite.dk References: <20030102140412.GG2863@gulag.guild.uwa.edu.au> <20030103083927.GB17651@gulag.guild.uwa.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20030103083927.GB17651@gulag.guild.uwa.edu.au> User-Agent: Mutt/1.5.1i # j-devenish@users.sourceforge.net / 2003-01-03 16:39:27 +0800: > I am looking for some feedback from *BSD users/admins who find > themselves using zsh's _bsd_pkg completion for pkg_add, pkg_create, > pkg_delete and pkg_info. I am working with OpenBSD but would really > appreciate some feedback from someone using _bsd_pkg under FreeBSD. I don't really use pkg_*, but do use FreeBSD. more below. > Includes a patch for _bsd_pkg_pkgfiles(), which was matching paths > against an undefined variable $PKG_PATH. Is this defined under FreeBSD, > perhaps? I found the completion worked erroneously under OpenBSD. pkg_add(1): The value of the PKG_PATH is used if a given package can't be found. The environment variable should be a series of entries separated by colons. Each entry consists of a directory name. The current directory may be indicated implicitly by an empty directory name, or explicitly by a sin­ gle period. I don't use the pkg_* tools, but looks like it should be ${PKG_PATH:-/usr/ports/packages} or something like that. > My attached version fixes that, and also allows this sort of completion: > % pkg_add > file1.tgz foo.tgz bar.tgz > % pkg_add dir1/file3.tgz > % pkg_add databases/ > db1.tgz db2.tgz > % pkg_add foo > pkg_add /usr/ports/packages/blah/All/foo.tgz > % pkg_add -v foo.tgz > pkg_add -v /usr/ports/packages/blah/All/foo.tgz nice! > I like the "new" behaviour. so do I. :) > Basically, the selection list is much more readable and can understand > packages subdirectories (to help jog one's memory). So far, the latter > is in a 'case' construct for OpenBSD since I don't know how other BSDs > lay out their /usr/ports/packages/*. should be the same. > Under OpenBSD, the -a option can only be used on its own (no other flags > or arguments are appropriate). I have implemented this inside a 'case' > for openbsd*. If the other BSDs are the same, then we can reduce some > of the 'case' constructs. A quick test shows that -v, -p, -q, -g further modify the -a output, others are noop. I haven't found a switch that would make it break (tried about 1/2 of them) -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html