Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: bug in _tar?

Bart wrote:

> ...
> The source of the problem is going to be that "emacs-" is a prefix of two
> directories which might (probably even do) contain "lisp" subdirectories,
> whereas "emacs-21.1." is a prefix only of the tar.gz file name of which
> the "lisp/" suffix can't possibly be a part.  Consequently there are no
> matches, but rather than beeping, something is executing `compadd -U',
> causing the current word to be replaced by the empty completion.

I've had a look at the weekend. And, yes, it's a `compadd -U', almost.

The real problem is the as yet somewhat simple minded support for suffixes
or for match-insertion-control. It happens in _prefix, the match is already
added with the stuff to the right of the cursor stuffed in ISUFFIX. Then
_prefix checks if there is only one match (as in this case) and if so, it
uses a `compadd -U' to try to make the cursor stay in the right place. With
complicated match specs, this may result in parts of the word being removed.
And with -U there isn't even much we can do about it.

So I'd like to not try and fix this in the matching code but instead try to
come up with the better suffix and insertion handling we were talking about
anyway. I'll try to write a list for discussion real soon now (I've already
got my other machine and hope to be able to install Linux on it this week,
so mailing list handling will be a whole lot easier for me then, uff).


Messages sorted by: Reverse Date, Date, Thread, Author