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

Re: Fake parameter completion?



On 18 Oct 2019, at 16:08, Chris Nebel <c.nebel@xxxxxxx> wrote:
> 1. Why are “fake” and “fake-parameters” distinct styles?  Obviously they
> behave differently in practice, but why couldn’t “fake” take the position
> into account and add the magic “=“ like “fake-parameters” does?

The immediate reason they work differently is that the styles are applied at
different points during completion. fake and fake-always are handled by the
low-level function _description, whilst fake-files and fake-parameters are
handled by their respective higher-level functions directly.

It probably could have been designed differently, but doing it this way seems
(comparatively) straight-forward, especially since they use incompatible
syntaxes for their values. But this was all long before my time, so i'm just
speculating

On 18 Oct 2019, at 16:08, Chris Nebel <c.nebel@xxxxxxx> wrote:
> 2. What is the actual value of the “*” in the context?  Not “parameters”,
> apparently.  (I should mention that I do not truly understand zshcompsys.)

The tag used for parameter completion is parameters, but _parameters omits it
when it looks up the style. I confess i'm not sure what the significance of
that is

dana



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