From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20636 invoked from network); 5 Feb 2002 10:38:20 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 5 Feb 2002 10:38:20 -0000 Received: (qmail 8534 invoked by alias); 5 Feb 2002 10:38:06 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4648 Received: (qmail 8523 invoked from network); 5 Feb 2002 10:38:05 -0000 Date: Tue, 5 Feb 2002 10:38:02 +0000 From: Rik To: Oliver Kiddle Cc: zsh-users@sunsite.dk Subject: Re: Can someone help me convert compctl to zstyle, please. Message-ID: <20020205103802.GA3602@spoon.pkl.net> References: <20020205031811.GA29284@spoon.pkl.net> <20020205100209.37738.qmail@web9305.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020205100209.37738.qmail@web9305.mail.yahoo.com> User-Agent: Mutt/1.3.25i On Tue, Feb 05, 2002 at 10:02:09AM +0000, Oliver Kiddle wrote: > Have you at least run compinit? (You need autoload -U compinit;compinit > in your .zshrc or run compinstall similarly from the command line). Yes, I had. > There is already a pre-written completion for sysctl so this should I haven't got anything in my /usr/local/share/zsh/4.0.2/functions with sysctl mentioned in it. I'll update to 4.0.4. > already work. If it didn't, you could do: > > _sysctl { > compadd $(sysctl -AN ${1%.*}) > } > compdef _sysctl sysctl Sorry for the incredibly dumb-sounding question, but *where* would I do that? I tested this it on the command line and in my ~/.zprofile, and zsh sulked. If I changed the first line to "_sysctl () {" (tested on the command line only, not that that should make a difference), then it accepts it happily, but fails when I try to use it. > Here you need something like: > zstyle ':completion:*:*:(ssh|scp):*:my-accounts' users-hosts \ > root@mail.mynetwork.com root@www.mynetwork.com Hm. Not quite the same as I had before, but close enough. I had got used to a single tab though. Hrm. Is there a way to remove the /etc/hosts from the lists of hostnames to try. I'm guessing it's something to do with the tag-order thing, but, uhm, again, it appears not to like me. > Peter has written a user-guide which has a good chapter on the new > completion system. You might find it easier than the manual. It is > available at http://zsh.sunsite.dk/Guide/zshguide.html Alas I was reading that yesterday too. I think I'm missing something fundamental. When I work out what that is, I'm sure it will all make sense. -- PGP Key: D2729A3F - Keyserver: wwwkeys.uk.pgp.net - rich at rdrose dot org Key fingerprint = 5EB1 4C63 9FAD D87B 854C 3DED 1408 ED77 D272 9A3F Public key also encoded with outguess on http://rikrose.net