Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: command-spelling correction strangeness
- X-seq: zsh-workers 8122
- From: Paul Kimoto <kimoto@xxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: command-spelling correction strangeness
- Date: Fri, 1 Oct 1999 15:09:37 -0400
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: <991001163203.ZM28059@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19990928235656.A22062@xxxxxxxxxxxxxxxxxxxxx> <990929053943.ZM22102@xxxxxxxxxxxxxxxxxxxxxxx> <19990929020225.A21607@xxxxxxxxxxxxxxxxxxx> <991001021154.ZM25595@xxxxxxxxxxxxxxxxxxxxxxx> <19990930232303.A5982@xxxxxxxxxxxxxxxxxxxxx> <991001040228.ZM25695@xxxxxxxxxxxxxxxxxxxxxxx> <19991001002659.A3777@xxxxxxxxxxxxxxxxxxx> <991001163203.ZM28059@xxxxxxxxxxxxxxxxxxxxxxx>
On Fri, Oct 01, 1999 at 04:32:03PM +0000, Bart Schaefer wrote:
> OK, the real scoop: My diagnosis was correct as far as it went, but I
> missed one detail, which is that even when hashcmds is set it's possible
> for `pathchecked' (zsh's internal pointer to how much of the path it has
> searched) to already have advanced beyond the directory containing the
> actual command. In that case resuming the check where it left off is not
> sufficient.
>
> Zsh's internal Cmdnam structure holds a pointer to the spot in the path
> where the command was found, so it's possible to restart the search from
> there, and I actually had that implemented for a bit; but it occurred to
> me that the reason the command can't be executed might be because it was
> moved to another place in the path, in which event the search ought to be
> started over from the beginning. This works because hashing of a single
> command does a test for executable-non-directory-ness, whereas hashing an
> entire directory simply stuffs every entry into the table. (So the whole
> problem can be avoided in the first place by "unsetopt hashdirs".)
>
> This goes on top of the previous patch.
[patch snipped]
The combination of this and the patch in
<990929053943.ZM22102@xxxxxxxxxxxxxxxxxxxxxxx>
(from 29 Sep 1999) does the job for me.
-Paul <kimoto@xxxxxxxxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author