Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Re: 3.1.9-dev-6 completion problem: `a | b`



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@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author