From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14667 invoked from network); 15 Jul 1999 07:49:39 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Jul 1999 07:49:39 -0000 Received: (qmail 18745 invoked by alias); 15 Jul 1999 07:49:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7151 Received: (qmail 18736 invoked from network); 15 Jul 1999 07:49:23 -0000 Date: Thu, 15 Jul 1999 09:49:22 +0200 (MET DST) Message-Id: <199907150749.JAA13107@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Wed, 14 Jul 1999 16:17:59 +0200 Subject: 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@informatik.hu-berlin.de