zsh-users
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-users@sunsite.auc.dk
Subject: Re: completion bug?
Date: Wed, 25 Aug 1999 16:58:55 +0200 (MET DST)	[thread overview]
Message-ID: <199908251458.QAA14166@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Gabor's message of Wed, 25 Aug 1999 10:25:22 -0400


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


             reply	other threads:[~1999-08-25 14:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-25 14:58 Sven Wischnowsky [this message]
1999-08-25 16:07 ` Gabor
  -- strict thread matches above, loose matches on Subject: below --
2000-08-02 13:15 Sven Wischnowsky
2000-08-02 10:49 Andy Spiegl
1999-08-25 14:25 Gabor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199908251458.QAA14166@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).