From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17036 invoked from network); 25 Aug 1999 16:07:51 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Aug 1999 16:07:51 -0000 Received: (qmail 9364 invoked by alias); 25 Aug 1999 16:07:28 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2514 Received: (qmail 9356 invoked from network); 25 Aug 1999 16:07:27 -0000 Message-ID: <19990825120717.A14216@vmunix.com> Date: Wed, 25 Aug 1999 12:07:17 -0400 From: Gabor To: Sven Wischnowsky , zsh-users@sunsite.auc.dk Subject: Re: completion bug? References: <199908251458.QAA14166@beta.informatik.hu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.1i In-Reply-To: <199908251458.QAA14166@beta.informatik.hu-berlin.de>; from Sven Wischnowsky on Wed, Aug 25, 1999 at 04:58:55PM +0200 X-Operating-System: FreeBSD 2.2.7-STABLE i386 Patch works great! Thanks. On Wed, Aug 25, 1999 at 04:58:55PM +0200, Sven Wischnowsky wrote: # # 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