From owner-freebsd-questions Sat Sep 23 18:36:42 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 0363437B424; Sat, 23 Sep 2000 18:36:40 -0700 (PDT) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id UAA00368; Sat, 23 Sep 2000 20:36:35 -0500 (CDT) (envelope-from dan) Date: Sat, 23 Sep 2000 20:36:35 -0500 From: Dan Nelson To: Ben Smithurst Cc: Sean-Paul Rees , questions@FreeBSD.ORG Subject: Re: zsh completion for /var/db/pkg Message-ID: <20000923203634.A27961@dan.emsphone.com> References: <20000923150435.A98968@seanrees.com> <20000924000033.A30774@strontium.scientia.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.3.9i In-Reply-To: <20000924000033.A30774@strontium.scientia.demon.co.uk>; from "Ben Smithurst" on Sun Sep 24 00:00:33 GMT 2000 X-OS: FreeBSD 5.0-CURRENT Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Sep 24), Ben Smithurst said: > Sean-Paul Rees wrote: > > > Also, does someone have a completion for the man pages? > > I think there's something do with pkg_* in the latest zsh ports, but I > could be mistaken. Hmm, it seems to be in zsh-devel, but not zsh. Take > a look anyway. compctl -g '/var/db/pkg/*(/:t)' pkg_delete pkg_info man_glob () { local a read -cA a if [[ $a[2] = [0-9]* ]] then reply=( ${^manpath}/man$a[2]/$1*$2(N:t:s/.gz//:r) ) else reply=( ${^manpath}/man*/$1*$2(N:t:s/.gz//:r) ) fi } compctl -K man_glob man Those two are what I use for zsh 3.0.* -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message