zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Re: 3.1.9-dev-6 completion problem: `a | b`
@ 2000-10-04 13:52 Sven Wischnowsky
  0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-10-04 13:52 UTC (permalink / raw)
  To: zsh-workers


E. Jay Berkenbilt wrote:

> If I say any of the following:
> 
> a | TAB
> `TAB
> a; TAB
> `a; TAB
> 
> I get a list of commands.  However, if I say
> 
> `a | TAB
> 
> I get a list of files.  In fact, even if I say
> 
> `a | junkTAB
> 
> I get a list of files.  I haven't studied the code enough to know what
> the problem is.  Changing ` to $( in all above cases does not change
> the behavior.

Ah, my favorite pastime: fiddling with get_comp_string(). Urgh.

It appears that this was a bad interaction with the code for control
structures. When reaching the word the cursor is on, it tested if it
had reached that before and if it had, it stopped looking
further. This was wrong when it was working on a `...` or $(...) string.

Bye
 Sven

Index: Src/Zle/zle_tricky.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v
retrieving revision 1.20
diff -u -r1.20 zle_tricky.c
--- Src/Zle/zle_tricky.c	2000/08/29 08:21:00	1.20
+++ Src/Zle/zle_tricky.c	2000/10/04 13:51:47
@@ -1158,6 +1158,7 @@
 		line[ll + addedx] = '\0';
 	    }
 	    lexrestore();
+	    tt = NULL;
 	    goto start;
 	}
     }

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-10-04 13:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-04 13:52 PATCH: Re: 3.1.9-dev-6 completion problem: `a | b` 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).