From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4689 invoked from network); 12 Jul 1999 12:11:44 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 12 Jul 1999 12:11:44 -0000 Received: (qmail 22350 invoked by alias); 12 Jul 1999 12:11:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7103 Received: (qmail 22343 invoked from network); 12 Jul 1999 12:11:32 -0000 Date: Mon, 12 Jul 1999 14:11:29 +0200 (MET DST) Message-Id: <199907121211.OAA18745@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Mon, 12 Jul 1999 13:27:07 +0200 Subject: Re: PATCH: completions for su and implicit fg/bg Peter Stephenson wrote: > Just trying compset -q to enhance completion for *sh -c: > > 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. > > What doesn't seem to get updated is CURRENT, which for consistency ought to > point into the $words array as modified. Whoa. Ahem. This also corrects the test to decide if the ignored prefix/suffix should be quoted or not. Bye Sven diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c --- os/Zle/zle_tricky.c Fri Jul 9 15:48:20 1999 +++ Src/Zle/zle_tricky.c Mon Jul 12 14:07:18 1999 @@ -5172,7 +5172,7 @@ compisuffix = ztrdup(""); zsfree(compqiprefix); zsfree(compqisuffix); - if (instring) { + if (ois) { compqiprefix = qp; compqisuffix = qs; } else { @@ -5188,6 +5188,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 Mon Jul 12 10:21:21 1999 +++ Doc/Zsh/compwid.yo Mon Jul 12 14:10:11 1999 @@ -622,9 +622,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