Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Regression in braces completion
- X-seq: zsh-workers 25853
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "Zsh Hackers' List" <zsh-workers@xxxxxxxxxx>
- Subject: Re: Regression in braces completion
- Date: Sun, 12 Oct 2008 00:10:51 -0700
- In-reply-to: <081011213249.ZM29979@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20a807210810111932r1b32b746l3cca788a383e84ed@xxxxxxxxxxxxxx> <081011213249.ZM29979@xxxxxxxxxxxxxxxxxxxxxx>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author