From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23538 invoked from network); 11 Apr 2001 22:07:00 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Apr 2001 22:07:00 -0000 Received: (qmail 8086 invoked by alias); 11 Apr 2001 22:06:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13949 Received: (qmail 8075 invoked from network); 11 Apr 2001 22:06:58 -0000 From: "Bart Schaefer" Message-Id: <1010411220641.ZM20380@candle.brasslantern.com> Date: Wed, 11 Apr 2001 22:06:40 +0000 In-Reply-To: Comments: In reply to Andrej Borsenkow "Slash after directory number in cd completion?" (Apr 12, 1:30am) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Andrej Borsenkow , Subject: Re: Slash after directory number in cd completion? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 12, 1:30am, Andrej Borsenkow wrote: } Subject: Slash after directory number in cd completion? } } bor@itsrm2:/u3/Linux%> cd -TAB } bor@itsrm2:/u3/Linux%> cd -1/ } } Where this slash comes from? It's _directory_stack calling `compadd -qS/ ...' via _wanted at line 50. This is new as of Sven's patch in 13789 (before _popd was renamed). I think the line [[ $PREFIX = [-+]* ]] || return 1 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. 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/11 22:04:39 @@ -13,14 +13,15 @@ ISUFFIX="/${SUFFIX#*/}$ISUFFIX" SUFFIX="${SUFFIX%%/*}" suf=(-S '') -else +elif [[ $PREFIX != [-+]* ]]; then suf=(-qS/) +else + suf=() fi ### we decided against this, for now... #! zstyle -T ":completion:${curcontext}:directory-stack" prefix-needed || - -[[ $PREFIX = [-+]* ]] || return 1 +# [[ $PREFIX = [-+]* ]] || return 1 if zstyle -T ":completion:${curcontext}:directory-stack" verbose; then # get the list of directories with their canonical number -- 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