From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6482 invoked from network); 12 Apr 2001 11:34:36 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 12 Apr 2001 11:34:36 -0000 Received: (qmail 28216 invoked by alias); 12 Apr 2001 11:34:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13958 Received: (qmail 28205 invoked from network); 12 Apr 2001 11:34:34 -0000 Message-ID: <20010412113428.86398.qmail@web9307.mail.yahoo.com> Date: Thu, 12 Apr 2001 12:34:28 +0100 (BST) From: =?iso-8859-1?q?Oliver=20Kiddle?= Subject: Re: Slash after directory number in cd completion? To: zsh-workers@sunsite.dk In-Reply-To: <1010411220641.ZM20380@candle.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit --- Bart Schaefer wrote: > It's _directory_stack calling `compadd -qS/ ...' via _wanted at line right. > I think the line > > [[ $PREFIX = [-+]* ]] || return 1 That is needed so that the directory stack is only completed after a - or + because the matches are added as 0, 1, 2, etc instead of -0, -1, -2, etc. > needs to be something/somewhere else. Perhaps like this? This seems > to > work as I expect, but Sven should confirm it when he's back next > week. It doesn't work as I'd expect - it adds the directory stack as completions without the - and +. _tilde now supplies the -qS/ option to _directory_stack and this is the only time it is needed so I believe the following patch is correct (this is instead of Bart's as opposed to on top of it). I actually think the correct patch would be to remove the whole if, then else because it is done in _tilde and isn't otherwise needed. I've left it for the time being though. Oliver Index: Completion/Zsh/Type/_directory_stack =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Zsh/Type/_directory_stack,v retrieving revision 1.1 diff -u -r1.1 _directory_stack --- Completion/Zsh/Type/_directory_stack 2001/04/02 11:20:31 1.1 +++ Completion/Zsh/Type/_directory_stack 2001/04/12 11:32:35 @@ -14,7 +14,7 @@ SUFFIX="${SUFFIX%%/*}" suf=(-S '') else - suf=(-qS/) + suf=() fi ### we decided against this, for now... ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie