zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "Zsh Hackers' List" <zsh-workers@sunsite.dk>
Subject: Re: Regression in braces completion
Date: Sun, 12 Oct 2008 00:10:51 -0700	[thread overview]
Message-ID: <081012001051.ZM30706@torch.brasslantern.com> (raw)
In-Reply-To: <081011213249.ZM29979@torch.brasslantern.com>

On Oct 11,  9:32pm, Bart Schaefer wrote:
}
} On Oct 11, 10:32pm, Vin Shelton wrote:
} }
} } $ ls abc{d<TAB>  ==>
} } $ ls abcdef{
} } 
} } which is not correct.
} 
} : _main_complete:62:then elif; [[ abcdef != */* && a == \~ ]]
} 
} That's $PREFIX on line 62 and the curly brace is already missing.

Turns out that's a red herring, it was that way in the older version
as well.

As nearly as I can track it down, the problem is with:

	* 25130 slightly tweaked for typos:
	Completion/Unix/Type/_path_files: changes to use -U flag
	to compadd so that spelling corrections in non-final
	path segments are accepted.

If I remove the -U option from all the calls to compadd in _path_files,
the old behavior is restored.

(That took *way* longer to track down than it should have, because I
didn't realize just how *many* calls to "compadd -U" there are, and I
missed the crucial one the first time and ended up chasing a different
red herring for an hour.  Oy.)

Removing the -U *only* from the compadd on line 634 of _path_files is
sufficient to fix this particular example, but I wonder if it should be
removed from all three of the compadd calls in the "we are listing, or
something" branch (see comment line 605), or if it needs to be omitted
based on some other condition ... or if we need to know when spelling
correction has been done so we can only add -U when we have to, or some
even more complicated set of conditions.


  reply	other threads:[~2008-10-12  7:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-12  2:32 Vin Shelton
2008-10-12  4:32 ` Bart Schaefer
2008-10-12  7:10   ` Bart Schaefer [this message]
2008-10-12 19:42     ` Peter Stephenson
2008-10-12 22:47       ` Bart Schaefer
2008-10-13  9:04         ` Peter Stephenson
2008-10-13 15:43           ` Bart Schaefer
2008-10-13 16:27             ` Peter Stephenson
2008-10-13 16:56               ` Bart Schaefer
2008-10-14  4:37               ` PATCH (?) " Bart Schaefer
2008-10-14  8:45                 ` Peter Stephenson
2008-10-15  1:34                   ` Vin Shelton

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=081012001051.ZM30706@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.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).