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

Re: Completing subcommand strings



Peter Stephenson wrote:

> I managed to get into trouble completing after
> 
>   sh -c 'tar xvf 
> 
> when it seems to like to insert another copy of `tar xvf' along with any
> file it's inserting; the bug could be in a lot of different places.  I'm
> certainly not expecting every little thing like that to be fixed before
> 3.1.6.

It seems 7103 didn't make it into test1. With this, it works for me.

Here it is again, for your convenience...

Bye
 Sven

diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c	Wed Jul 14 16:07:41 1999
+++ Src/Zle/zle_tricky.c	Thu Jul 15 09:09:35 1999
@@ -5188,7 +5188,7 @@
 	compisuffix = ztrdup("");
 	zsfree(compqiprefix);
 	zsfree(compqisuffix);
-	if (instring) {
+	if (ois) {
 	    compqiprefix = qp;
 	    compqisuffix = qs;
 	} else {
@@ -5204,6 +5204,7 @@
 	    p = compwords[i] = (char *) getdata(n);
 	    untokenize(p);
 	}
+	compcurrent = cur + 1;
 	compwords[i] = NULL;
     }
     autoq = oaq;
diff -u od/Zsh/compwid.yo Doc/Zsh/compwid.yo
--- od/Zsh/compwid.yo	Wed Jul 14 13:01:56 1999
+++ Doc/Zsh/compwid.yo	Thu Jul 15 09:10:21 1999
@@ -628,9 +628,9 @@
 item(tt(-q))(
 The word
 currently being completed is split in separate words at the spaces. The 
-resulting words are stored in the tt(words) array, and tt(PREFIX),
-tt(SUFFIX), tt(QIPREFIX), and tt(QISUFFIX) are modified to reflect the 
-word part that is completed.
+resulting words are stored in the tt(words) array, and tt(CURRENT),
+tt(PREFIX), tt(SUFFIX), tt(QIPREFIX), and tt(QISUFFIX) are modified to
+reflect the word part that is completed.
 )
 enditem()
 

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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