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

Re: completion with midword tildes



Bart Schaefer wrote:

> On Jan 12, 10:07am, Sven Wischnowsky wrote:
> } Subject: Re: completion with midword tildes
> }
> } A pure user-code solution would be to use a match spec such as 'm:=\\'
> } (or several of these, making the backslash only optional before some
> } special characters) in ones $compmatchers, but maybe we should make
> } the completion code do that by default. What I want to say is that
> } nowadays I would implement it in exactly this way -- modify the
> } matching function to ignore backslashes. That's what the patch below
> } tries to attempt -- it works but there may be some complicated
> } interactions with complex match specs, I'll have to test that.
> 
> What happens if the file name (or whatever else is being completed)
> actually *contains* a backslash?  I.e. the backslash isn't just there
> to quote some other special character.

I guess you tried it already: here one needs two backslashes on the
line to complete. Hm. The only thing I can say to defend this
behaviour is that the backslash (of course) always shows slightly
different behaviour (comparing `a\b', `a\\b' and `a~b', `a\~b').

Should we change that? (Consider me saying this very timidly.)

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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