From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20474 invoked from network); 2 Oct 2002 03:16:46 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 2 Oct 2002 03:16:46 -0000 Received: (qmail 16461 invoked by alias); 2 Oct 2002 03:16:20 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5407 Received: (qmail 16446 invoked from network); 2 Oct 2002 03:16:18 -0000 From: "Bart Schaefer" Message-Id: <1021002031516.ZM14546@candle.brasslantern.com> Date: Wed, 2 Oct 2002 03:15:16 +0000 In-Reply-To: <20021001113453.GA3095@chem.helsinki.fi> Comments: In reply to Jonas Juselius "zstyle problems" (Oct 1, 2:34pm) References: <20021001113453.GA3095@chem.helsinki.fi> X-Mailer: Z-Mail (5.0.0 30July97) To: Jonas Juselius , zsh-users@sunsite.dk Subject: Re: zstyle problems MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 1, 2:34pm, Jonas Juselius wrote: } Subject: zstyle problems } } I wanted different completion for 'cd' and the rest of the commands. I } put the following lines in my .zshrc: } } zstyle ':completion:*:*:cd:*' completer _complete } zstyle ':completion:*' completer _complete _correct _approximate } } But to my big surprise, I still get exactly the same completion (with } corrections) for 'cd' and the other progs. Am I missing something here? The individual command context is not yet established at the time the completer style is looked up; more specifically, the completer style is always checked with the context ":completion:::::" (except in specialty widgets like insert-and-predict). The precise context including the command name (or contexts like "-tilde-") is actually set up *by* the completers. } I also tried to change tag-order for the [-tilde-] completer so that it } would complete named directories before users, but that failed as } well... Hmm. The following works for me: zstyle ':completion::complete:-tilde-:*' tag-order \ named-directories users directory-stack -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net