zsh-workers
 help / color / mirror / code / Atom feed
* Patch available for 3.0.6-pre-0
@ 1999-04-21  8:15 Bart Schaefer
  1999-04-21  8:47 ` Peter Stephenson
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Bart Schaefer @ 1999-04-21  8:15 UTC (permalink / raw)
  To: zsh-workers

I've made up a preliminary patch for 3.0.6, which carries the version number
3.0.6-pre-0.  It's available at
	ftp://ftp.brasslantern.com/pub/zsh/zsh-3.0.5-3.0.6-pre-0.diff

Checksums:

(BSD)  19136    91
(SYSV) 57735 182 zsh-3.0.5-3.0.6-pre-0.diff

I'd appreciate feedback from anyone who grabs it and applies it.  Check for
anything that looks like it shouldn't be there (I had to excise a few of my
own local changes before generating the diff); and, in particular, if PWS
is listening and has a chance to check my adaptation of his zleread() fix
for IRIX cut'n'paste, that'd be great.

See the ChangeLog file for details of what's included; patch coverage goes
back to November 1997.  I didn't precisely preserve the ChangeLog format
because I generated the new entries with the cvs2cl Perl script posted to
the info-cvs mailing list a few weeks ago.  If anybody thinks this is a
problem, holler at me and I'll see about tweaking the script to spit out
the previous format.

Things that aren't done yet:

* The documentation isn't up to date with all the code changes.

* The texinfo documentation is out of sync with the man pages.

* I haven't done anything with Greg Badros's color completion patches.  I
  wasn't certain there was a consensus for including them, and there was
  some discussion of altering the implementation to be more 3.1.5-friendly.

* I haven't decided what to do with RCS $Id$ keywords.  I don't have the
  "original" RCS or CVS archives from Zoltan, and expanding those from my
  own CVS repository will set them back to the 1.somethings.  I'm tempted
  to simply remove them.  Any comments or suggestions?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: Patch available for 3.0.6-pre-0
@ 1999-04-23 12:48 Sven Wischnowsky
  0 siblings, 0 replies; 14+ messages in thread
From: Sven Wischnowsky @ 1999-04-23 12:48 UTC (permalink / raw)
  To: zsh-workers


[ *This* is the one I wanted to sent here. ]

Bart Schaefer wrote:

> I've made up a preliminary patch for 3.0.6, which carries the version number
> 3.0.6-pre-0.  It's available at
> 	ftp://ftp.brasslantern.com/pub/zsh/zsh-3.0.5-3.0.6-pre-0.diff

I've played with this a bit, trying to remember the things we fixed in 
the completion code in 3.1.5. I seem to remember that one of the
patches I sent after 4988 (which is the last entry with my name in it
in the ChangeLog) fixed something that might be buggy in
3.0.[56]. Unfortunately I forgot to write myself a note about this and
I can't remember what it was.
Hm, maybe everyone who sent a bug-report about old-style completion to 
the list could try it with Bart's pre-3.0.6 version?

I'll continue to search, too.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: Patch available for 3.0.6-pre-0
@ 1999-04-23 14:13 Sven Wischnowsky
  0 siblings, 0 replies; 14+ messages in thread
From: Sven Wischnowsky @ 1999-04-23 14:13 UTC (permalink / raw)
  To: zsh-workers


I wrote:

> I seem to remember that one of the
> patches I sent after 4988 (which is the last entry with my name in it
> in the ChangeLog) fixed something that might be buggy in
> 3.0.[56]. Unfortunately I forgot to write myself a note about this and
> I can't remember what it was.

I found /them/:

 - Completion inside $((...)) didn't work -- see message 5799.
 - The other fix was hidden in 5564: at the end of makecomplist(),
   `addmatches' is set and then a couple of `dumphashtable()'s may be
   called and also some `addmatch()'es directly. Since
   `dumphashtable()' sets `addwhat' but doesn't restore it this may
   sometimes have the wrong value. Most significantly, if you have
   `compctl -vb foo', `foo <TAB>' seg-faults.

The patch also avoids some `suggest brace around ambiguous else'
messages.

Bye
 Sven

--- Src/zle_tricky.c.old	Thu Apr 22 09:04:42 1999
+++ Src/zle_tricky.c	Fri Apr 23 16:05:34 1999
@@ -578,7 +578,7 @@
 	    if (*q == Equals) {
 		/* The word starts with `=', see if we can expand it. */
 		q = s + 1;
-		if (cmdnamtab->getnode(cmdnamtab, q) || hashcmd(q, pathchecked))
+		if (cmdnamtab->getnode(cmdnamtab, q) || hashcmd(q, pathchecked)) {
 		    if (isset(RECEXACT))
 			lst = COMP_EXPAND;
 		    else {
@@ -600,6 +600,7 @@
 			if (n == 1)
 			    lst = COMP_EXPAND;
 		    }
+		}
 	    }
 	    if (lst == COMP_EXPAND_COMPLETE)
 		do {
@@ -708,11 +709,12 @@
 		if (*p == Tilde || *p == Equals)
 		    p++;
 		for (; *p; p++)
-		    if (itok(*p))
+		    if (itok(*p)) {
 			if (*p != String && *p != Qstring)
 			    *p = ztokens[*p - Pound];
 			else if (p[1] == Inbrace)
 			    p++, skipparens(Inbrace, Outbrace, &p);
+		    }
 		docompletion(s, lst, lincmd, 1);
 	    }
 	} else
@@ -1017,12 +1019,16 @@
 	    if (parend >= 0 && !tmp)
 		line = (unsigned char *) dupstring(tmp = (char *)line);
 	    linptr = (char *) line + ll + addedx - parbegin + 1;
-	    if (parend >= 0) {
-		ll -= parend;
-		line[ll + addedx] = '\0';
+
+	    if ((linptr - (char *) line) < 2 ||
+		linptr[-1] != '(' || linptr[-2] != '$') {
+		if (parend >= 0) {
+		    ll -= parend;
+		    line[ll + addedx] = '\0';
+		}
+		lexrestore();
+		goto start;
 	    }
-	    lexrestore();
-	    goto start;
 	}
 
 	if (inwhat == IN_MATH)
@@ -1272,7 +1278,7 @@
 			   *u == (char)bangchar) ||
 	     (instring == 2 &&
 	      (*u == '$' || *u == '`' || *u == '\"')) ||
-	     (instring == 1 && *u == '\'')))
+	     (instring == 1 && *u == '\''))) {
 	    if (*u == '\n' || (instring == 1 && *u == '\'')) {
 		if (unset(RCQUOTES)) {
 		    *v++ = '\'';
@@ -1287,6 +1293,7 @@
 		continue;
 	    } else
 		*v++ = '\\';
+	}
 	if(*u == Meta)
 	    *v++ = *u++;
 	*v++ = *u;
@@ -1923,14 +1930,14 @@
 dumphashtable(HashTable ht, int what)
 {
     HashNode hn;
-    int i;
+    int i, aw = addwhat;
 
     addwhat = what;
 
     for (i = 0; i < ht->hsize; i++)
 	for (hn = ht->nodes[i]; hn; hn = hn->next)
 	    addmatch(hn->nam, (char *) hn);
-
+    addwhat = aw;
 }
 
 /* ScanFunc used by maketildelist() et al. */
@@ -3342,7 +3349,7 @@
 	    menuend = ll;
 	if (menuend && ((((char)line[menuend - 1]) != singlec) ||
 	    (menuend > 1 && singlec == ' ' &&
-	      (line[menuend - 2] == '\\' || line[menuend - 2] == STOUC(Meta)))))
+	     (line[menuend - 2] == '\\' || line[menuend - 2] == STOUC(Meta))))) {
 	    if (parampre && singlec == '/' && ((char)line[menuend]) == '/')
 		addedsuffix = 0;
 	    /* Now insert the slash or space if there is none already. */
@@ -3357,6 +3364,7 @@
 		if (!menuwe)
 		    cs = ccs;
 	    }
+	}
     }
     /* Move to the end of the word if requested. */
     if (isset(ALWAYSTOEND) || menuwe)
@@ -3664,7 +3672,7 @@
 	if (t1 != colsz - 1 || !clearflag)
 	    putc('\n', shout);
     }
-    if (clearflag)
+    if (clearflag) {
 	/* Move the cursor up to the prompt, if always_last_prompt *
 	 * is set and all that...                                  */
 	if (up < lines) {
@@ -3672,6 +3680,7 @@
 	    showinglist = -1;
 	} else
 	    clearflag = 0, putc('\n', shout);
+    }
 }
 
 /* This is used to print expansions. */

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

end of thread, other threads:[~1999-04-27 16:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-21  8:15 Patch available for 3.0.6-pre-0 Bart Schaefer
1999-04-21  8:47 ` Peter Stephenson
1999-04-21 14:14 ` Tatsuo Furukawa
1999-04-21 16:05   ` Bart Schaefer
1999-04-22 15:07     ` Tatsuo Furukawa
1999-04-24  5:53       ` Bart Schaefer
1999-04-25  6:57         ` Geoff Wing
1999-04-26 15:22           ` Tatsuo Furukawa
1999-04-27 16:24             ` Bart Schaefer
1999-04-21 23:52 ` Wayne Davison
1999-04-24  4:32   ` Bart Schaefer
1999-04-24  7:12     ` Wayne Davison
1999-04-23 12:48 Sven Wischnowsky
1999-04-23 14:13 Sven Wischnowsky

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).