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

Re: Bug in spell correction of directories for cd



On May 8,  9:53am, Peter Stephenson wrote:
}
} Hmm... I wonder if there's scope for an even-more-magic-space command
} that sees if a shell argument has just been completed and if it
} should spell check it?

The trouble with that is that completion usually adds the trailing space,
so when would one ever type the space that invokes even-more-magic-space?

} You'd need a long list either of exceptions or inclusions, which might
} have to be narrowed down by argument position.

Here's a nutty idea.  In the same way that highlighting regions are
maintained for the buffer, maintain a list of regions that label how
that particular part of the buffer was filled: by ordinary self-insert,
by completion, by yanking from the kill ring, etc.  Then when global
correction makes its pass over the words, it could use those region
labels for context.

Of course one reason this is nutty is because of the ability for user-
defined widgets to manipulate BUFFER and friends directly.  The other
is that correction is in the main shell and doesn't necessarily have
anything to do with ZLE.



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