From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4034 invoked from network); 11 Jun 2007 09:04:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=no version=3.2.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Jun 2007 09:04:48 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 64489 invoked from network); 11 Jun 2007 09:04:41 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Jun 2007 09:04:41 -0000 Received: (qmail 14925 invoked by alias); 11 Jun 2007 09:04:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23543 Received: (qmail 14916 invoked from network); 11 Jun 2007 09:04:38 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Jun 2007 09:04:38 -0000 Received: (qmail 64277 invoked from network); 11 Jun 2007 09:04:38 -0000 Received: from cluster-c.mailcontrol.com (168.143.177.190) by a.mx.sunsite.dk with SMTP; 11 Jun 2007 09:04:34 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly25c.srv.mailcontrol.com (MailControl) with ESMTP id l5B91xYY007174 for ; Mon, 11 Jun 2007 10:04:24 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 11 Jun 2007 10:03:41 +0100 Date: Mon, 11 Jun 2007 10:03:40 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: Buglet in zsh perforce completion function Message-ID: <20070611100340.44e0390c@news01.csr.com> In-Reply-To: <070610011909.ZM32437@torch.brasslantern.com> References: <200706051812.l55ICXMM004955@news01.csr.com> <070609185904.ZM32348@torch.brasslantern.com> <070610011909.ZM32437@torch.brasslantern.com> Organization: CSR X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Jun 2007 09:03:41.0018 (UTC) FILETIME=[67D613A0:01C7AC07] X-Scanned-By: MailControl A-07-07-05 (www.mailcontrol.com) on 10.67.0.135 On Sun, 10 Jun 2007 01:19:09 -0700 Bart Schaefer wrote: > } Also you've said that -p and -W are the same string, which > } by my reading means [...] it would test for > } the file "$dir/$dir/..." which can't possibly be what you mean. > > ... still stands. I think they do different things, since normal file completion uses this form, at least in the context in question: compadd -Qf -J files -X 'Completing file' -F _comp_ignore -p \ macrame/ -W macrame/ -R _perforce_file_suffix -M 'r:|/=* r:|=*' -a tmp1 However, I'm just going to avoid the problem by commenting out the code that's causing it, which doesn't do very much. It ought to be possible to replace it using fake or fake-files, but currently the tags in _perforce aren't helpful enough. Index: Completion/Unix/Command/_perforce =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_perforce,v retrieving revision 1.36 diff -u -r1.36 _perforce --- Completion/Unix/Command/_perforce 28 Nov 2006 21:57:28 -0000 1.36 +++ Completion/Unix/Command/_perforce 11 Jun 2007 08:59:59 -0000 @@ -858,14 +858,20 @@ } -(( $+functions[_perforce_subdirs] )) || -_perforce_subdirs() { - # This has no other function than to offer to add the `...' used - # by Perforce to indicate a recursive search of directories. - # Bit pathetic, really. - compset -P '*/' - compadd "$@" '...' -} +# This has no other function than to offer to add the `...' used +# by Perforce to indicate a recursive search of directories. +# Bit pathetic, really. +# +# This has been causing odd effects with prefixes so is turned off. +#(( $+functions[_perforce_subdirs] )) || +#_perforce_subdirs() { +# if [[ $PREFIX = */* ]]; then +# local dir=${PREFIX%%[^/]#} +# compadd "$@" -J subdirs -p $dir ... +# else +# compadd "$@" -J subdirs ... +# fi +#} (( $+functions[_perforce_depot_dirs] )) || @@ -1076,7 +1082,8 @@ altfiles+=("client-dirs:client directory:_perforce_client_dirs") fi altfiles+=("depot-dirs:directory in depot:_perforce_depot_dirs" - "subdirs:subdirectory search:_perforce_subdirs") +# "subdirs:subdirectory search:_perforce_subdirs" + ) _alternative $altfiles elif [[ -n $unmaintained && -z $dodirs ]]; then # a la _cvs_nonentried_files: directories are never maintained, @@ -1113,7 +1120,7 @@ altfiles+=("$type-files:$type file:_perforce_${type}_files") done - altfiles+=("subdirs:subdirectory search:_perforce_subdirs") +# altfiles+=("subdirs:subdirectory search:_perforce_subdirs") if zstyle -t ":completion:${curcontext}:" depot-files; then altfiles+=("depot-dirs:directory in depot:_perforce_depot_dirs") else @@ -1126,13 +1133,15 @@ altfiles+=("depot-files:file in depot:_perforce_depot_files") fi altfiles+=("depot-dirs:directory in depot:_perforce_depot_dirs" - "subdirs:subdirectory search:_perforce_subdirs") +# "subdirs:subdirectory search:_perforce_subdirs" + ) _alternative $altfiles else # Look locally. - _alternative \ - "files:file:_path_files -R _perforce_file_suffix $dodirs" \ - "subdirs:subdirectory search:_perforce_subdirs" +# _alternative \ +# "files:file:_path_files -R _perforce_file_suffix $dodirs" \ +# "subdirs:subdirectory search:_perforce_subdirs" + _path_files -R _perforce_file_suffix $dodirs fi } -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview