Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Sep 2000 20:36:35 -0500
From:      Dan Nelson <dnelson@emsphone.com>
To:        Ben Smithurst <ben@FreeBSD.ORG>
Cc:        Sean-Paul Rees <sean@seanrees.com>, questions@FreeBSD.ORG
Subject:   Re: zsh completion for /var/db/pkg
Message-ID:  <20000923203634.A27961@dan.emsphone.com>
In-Reply-To: <20000924000033.A30774@strontium.scientia.demon.co.uk>; from "Ben Smithurst" on Sun Sep 24 00:00:33 GMT 2000
References:  <20000923150435.A98968@seanrees.com> <20000924000033.A30774@strontium.scientia.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000923203634.A27961>