zsh-workers
 help / color / mirror / code / Atom feed
* [vincent@vinc17.org: Bug#278368: zsh-beta: svn completions no longer work]
@ 2004-10-26 14:48 Clint Adams
  2004-10-26 17:04 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Clint Adams @ 2004-10-26 14:48 UTC (permalink / raw)
  To: zsh-workers; +Cc: 278368-forwarded

This problem seems to have sprouted up between 10/14 and 10/18.
Roughly.

----- Forwarded message from Vincent Lefevre <vincent@vinc17.org> -----

Package: zsh-beta
Version: 4.2.1-dev-1+20041022-1
Severity: normal

When I do a completion like "svn st [TAB]" in a working copy, I get
the following error message:

_arguments:comparguments:208: invalid argument: display

Removing the .zcompdump file and restarting zsh had no effect on this
problem.

Completions still work with zsh from the zsh package (/bin/zsh4).

Note: I have subversion version 1.0.9-2 (current unstable).

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (900, 'testing'), (200, 'unstable')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.8
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1

Versions of packages zsh-beta depends on:
ii  libc6                       2.3.2.ds1-18 GNU C Library: Shared libraries an
ii  libcap1                     1:1.10-14    support for getting/setting POSIX.
ii  libncurses5                 5.4-4        Shared libraries for terminal hand
ii  libpcre3                    4.5-1.1      Perl 5 Compatible Regular Expressi
ii  passwd                      1:4.0.3-30.2 Change and administer password and

-- no debconf information

----- End forwarded message -----


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [vincent@vinc17.org: Bug#278368: zsh-beta: svn completions no longer work]
  2004-10-26 14:48 [vincent@vinc17.org: Bug#278368: zsh-beta: svn completions no longer work] Clint Adams
@ 2004-10-26 17:04 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2004-10-26 17:04 UTC (permalink / raw)
  To: zsh-workers, 278368-forwarded

Clint Adams wrote:
> When I do a completion like "svn st [TAB]" in a working copy, I get
> the following error message:
> 
> _arguments:comparguments:208: invalid argument: display

This is another collision between the glob code and the pattern match
code as amended.  I think this fixes it.  That file in glob.c really
needs the unmetafy treatment, too.

Index: Src/glob.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/glob.c,v
retrieving revision 1.36
diff -u -r1.36 glob.c
--- Src/glob.c	18 Oct 2004 11:56:17 -0000	1.36
+++ Src/glob.c	26 Oct 2004 17:02:55 -0000
@@ -2206,8 +2206,20 @@
     repllist = NULL;
 
     /* perform must-match test for complex closures */
-    if (p->mustoff && !strstr((char *)s, (char *)p + p->mustoff))
-	matched = 0;
+    if (p->mustoff)
+    {
+	/*
+	 * Yuk.  Probably we should rewrite this whole function to
+	 * use an unmetafied test string.
+	 *
+	 * Use META_HEAPDUP because we need a terminating NULL.
+	 */
+	char *muststr = metafy((char *)p + p->mustoff,
+			       p->patmlen, META_HEAPDUP);
+
+	if (!strstr(s, muststr))
+	    matched = 0;
+    }
 
     /* in case we used the prog before... */
     p->flags &= ~(PAT_NOTSTART|PAT_NOTEND);
Index: Test/D02glob.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/D02glob.ztst,v
retrieving revision 1.7
diff -u -r1.7 D02glob.ztst
--- Test/D02glob.ztst	22 Oct 2004 15:36:40 -0000	1.7
+++ Test/D02glob.ztst	26 Oct 2004 17:02:56 -0000
@@ -312,3 +312,8 @@
  [[ "" = "" ]] && echo OK
 0:Empty strings
 >OK
+
+ foo="this string has a : colon in it"
+ print ${foo%% #:*}
+0:Must-match arguments in complex patterns
+>this string has a

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-26 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-26 14:48 [vincent@vinc17.org: Bug#278368: zsh-beta: svn completions no longer work] Clint Adams
2004-10-26 17:04 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).