From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20795 invoked from network); 5 Feb 2002 11:26:37 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 5 Feb 2002 11:26:37 -0000 Received: (qmail 17837 invoked by alias); 5 Feb 2002 11:26:22 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4649 Received: (qmail 17824 invoked from network); 5 Feb 2002 11:26:21 -0000 Message-ID: <20020205112619.20191.qmail@web9301.mail.yahoo.com> Date: Tue, 5 Feb 2002 11:26:19 +0000 (GMT) From: =?iso-8859-1?q?Oliver=20Kiddle?= Subject: Re: Can someone help me convert compctl to zstyle, please. To: Rik Cc: zsh-users@sunsite.dk In-Reply-To: <20020205103802.GA3602@spoon.pkl.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Rik wrote: > Sorry for the incredibly dumb-sounding question, but *where* would I > do > that? Probably after compinit in your .zshrc. Or from the command-line if you are just testing it. > zsh sulked. If I changed the first line to "_sysctl () {" (tested on Sorry, my mistake. I'm stuck on a windows PC and couldn't test what I was writing. You do need the () in the function definition as you spotted. Also, the call to the sysctl command would need to be changed to output all the sysctl variables. I didn't look closely at your compctl function which references $1. The new system uses special variables like $PREFIX instead. Ignore the _sysctl example I gave you and try something simpler like: _f() { compadd one two three } ; compdef _f f If that works, then you're not missing anything fundamental. You can get the latest _sysctl from: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/zsh/zsh/Completion/Unix/Command/_sysctl?rev=1.4 > > 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. It's an area of the new completion system that needs some reworking. > 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. You could try setting the hosts style which if set prevents the /etc/hosts lookup. You may need a fairly specific context if you want to keep /etc/hosts in other contexts (probably use the same context as for users-hosts above after chopping `:my-accounts' off the end). Typing Ctrl-X,h is useful for working out the right context. There might be another, perhaps better way using tag-order but I'm not too sure of details without first getting to a UNIX box. Oliver __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com