Zsh Mailing List Archive
Messages sorted by:
Re: compset -q oddities
On Sep 14, 9:52pm, Oliver Kiddle wrote:
} Subject: Re: compset -q oddities
} Bart wrote:
} > } That's a bit tricky. I think it should append an escaped space, e.g.,
} > } "sh -c touc<TAB>" should append <h> <Backslash> <Space>.
} > No, that's *exactly* the kind of DWIM-ing that we abandoned. If the user
} > wants the space quoted, then he should start with "sh -c 'touc<TAB>".
} For this specific case, I don't entirely agree because in theory the
} mechanics are in place for that to work.
Actually I think you *do* agree -- specifically, that the decision of
whether to quote the space is the responsibility of the completer, not
something that compset -q and compadd should always assume?
} compset -q appears to disable the default suffix that completions have:
} I'm not sure why. Any ideas?
} Adding calls to compquote in every function that needs a suffix is
} not a good idea. With a code refactoring, perhaps the suffix could
} be quoted automatically but we'd need an option that makes it easier
} to indicate that quoting levels should be closed (accumulating them
} as completion functions call each other). And I'm not sure about
I think you're just rehashing some of the reasons that we punted this.
} One other thing I notice in the code for compset -q is that it is
} a completely different function internally from that which does the
} initial word split when completion starts.
You're referring to set_comp_sep() ? I think it's different because
it's simultaneously removing quoting and updating various positions
(pointers/indexes into the buffer), but I could easily be wrong.
} It'd be nice if vared could be used without the initial parse:
} variable values aren't necessarily shell syntax.
There are other cases where it would be helpful to be able to change
the notion of what a "word" is; I think it was Sebastian who wanted
to complete entire lines out of the history. Trouble is, that means
either wrapper widgets to set up state, or a new class of completion
widgets that get the definition of a word from ... where?
Messages sorted by: