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

Re: completion features



Bart Schaefer wrote:

> X-Seq: 5778
> 
> Sven Wischnowsky writes:
>  > 
>  > One more question: we could make this user-configurable. E.g.
>  > `compconfig[...]=-1' would mean that `line_len - 1' errors would be
>  > accepted and so on. Should we...? Any suggestions for the `...'? ;-)
> 
> Pardon me if I've missed something, but you aren't really suggesting
> that the number of errors be based on the entire length of the input
> line, are you?  The length of the current _word_, surely?

Of course. What I meant was: the length of the word from the line.

> For file
> names, it should probably only be the length of the path segment that
> actually contains the cursor.

That's what the hunks in `_path_files' did.

> And why set it to a negative number?  What would a positive number mean?

A positive number would allow more erros than there are characters in
the word. Dunno if there are people who would like that, though.

In another message, answering the above, Bart wrote:

> That last sentence applies to completeinword only, of course.  If you're
> at the end of a /u/s/l/z/z/s/ path expecting it to expand all the way to
> /usr/src/local/zsh/zsh-3.1.5-pws-11/Src/, having the length of the word
> determine the number of errors makes sense.

Implementing this would actually be quite difficult because of the
splitting `_path_files' has to do in some places.

> Perhaps the length of the word minus the number of slashes?  Argh.  I'm
> thinking about this too hard.

Maybe we just let people play with it some more and then collect
suggestions how all this can be improved. What I'd like to hear about
is `unexpected' behavior (whatever that means ;-).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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