From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13875 invoked from network); 25 Aug 1999 14:59:17 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Aug 1999 14:59:17 -0000 Received: (qmail 1518 invoked by alias); 25 Aug 1999 14:58:57 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2511 Received: (qmail 1511 invoked from network); 25 Aug 1999 14:58:56 -0000 Date: Wed, 25 Aug 1999 16:58:55 +0200 (MET DST) Message-Id: <199908251458.QAA14166@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-users@sunsite.auc.dk In-reply-to: Gabor's message of Wed, 25 Aug 1999 10:25:22 -0400 Subject: Re: completion bug? Gabor wrote: > I have found an interesting completion bug in 3.1.6 which did not > exist in 3.1.5. Here is the gist of it. > $ some_command $(<.s > at this point I hit tab and I have a directory called .ssh. Instead of > completing it, it adds another '.' and then beeps at me. If I complete > the directory name itself, then type tab for the contents, it then > reinserts the directory name again. > $ some_command $(<.ssh/ > now it inserts .ssh again after the forward slash. If I type in the > the first character of the name I want completed it works fine. It's > a totally weird bug. You have to try it yourself to understand it. I > tried it in 3.1.5 and it didn't do this. Whoa. We had some trouble with the changed command line parsing for completion, but this once worked. This should fix it. Bye Sven diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c --- os/Zle/zle_tricky.c Wed Aug 25 14:58:19 1999 +++ Src/Zle/zle_tricky.c Wed Aug 25 16:57:32 1999 @@ -1422,7 +1422,7 @@ if (parend >= 0 && !tmp) line = (unsigned char *) dupstring(tmp = (char *)line); linptr = (char *) line + ll + addedx - parbegin + 1; - if ((linptr - (char *) line) < 2 || + if ((linptr - (char *) line) < 3 || *linptr != '(' || linptr[-1] != '(' || linptr[-2] != '$') { if (parend >= 0) { ll -= parend; @@ -1482,6 +1482,7 @@ tmp = NULL; linptr = (char *)line; lexrestore(); + addedx = 0; goto start; } noaliases = 0; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de