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

Re: PATCH: completions for su and implicit fg/bg



I wrote:

> I wrote:
> 
> > This allows `compset -q' on unquoted words -- almost. There is a
> > problem when the match contains characters that have to be quoted. In
> > such cases the match should be quoted twice (`a b' should be inserted
> > as `a\\\ b'), but currently the completion code is far from being
> > prepared for such double-quoting and I'm seeing to much places where
> > changes are needed for a quick patch.
> 
> I've been thinking some more about this... This can get pretty ugly
> when we have multiple calls to `compset -q' for the same word. In such 
> cases we would have to keep track of the number of calls (the nesting
> level) and then quote the words put into the command line n times. Of
> course the results may become almost unreadable and it would require
> changes in several parts of the code.

I've now spent several days trying to get this right -- and am now
really fed up. My last solution almost worked but still had problems
with, e.g. zsh -c 'zsh -c "zsh -c echo\ <TAB>. Mainly due to the
somewhat weird backslash-in-quotes behavior. Also, I only had this for 
inserting unambiguous matches (do_single()), and the stuff for
unambiguous prefixes is even harder.

So, I *will* some day try to fix this, but I don't think I'll be able
to do this this week and next week I'll be away.

I'll have to find a completely different way for this...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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