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

Re: completion files sensitive to user options like RC_QUOTES



Bart wrote:
> The intention is that completion files will be auto-loaded from the
> completion system after _main_complete has started, where they will be
> affected by the set of options that it controls.

There's a lot of places where we want the completion system to be
sensitive to the user's choice of options. For example:

  _foo() { compadd "don't" }
  compdef _foo foo
  foo '<tab> → 'don''t'
  _comp_options+=( NO_rcquotes )
  foo '<tab> → 'don'\''t'

In the early days, _comp_options was intentionally kept minimal.
It contains a lot more than it used to so I worry that we've already
broken things in some areas.

The quoting is internal to the C code so shouldn't look at
_comp_caller_options. We'd need to add some sort of hook, though
I'd prefer to see that done as part of an effort to make the quoting
part of completion more generic in general. I can't think of a good
trivial solution.

In many respects, I think it is welcome that more vendors are including
zsh completion functions. We get functions maintained by people who know
the software but then they aren't maintained by people who know zsh so
well.

Oliver



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