Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Proposal: Let compinit make standard widgets with _generic instead of _main_complete
- X-seq: zsh-workers 48386
- From: Lawrence Velázquez <vq@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Proposal: Let compinit make standard widgets with _generic instead of _main_complete
- Date: Sat, 03 Apr 2021 15:37:51 -0400
- Archived-at: <https://zsh.org/workers/48386>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-04/dc8150e9-f42a-4502-828d-1ac8cbf26940%40www.fastmail.com>
- In-reply-to: <CAHLkEDuo=8MbjYWOmQM5d4uLOzo+BC6XTy=S14-BfeBPMZjysw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHLkEDuxX39Z7-ioZTgrosL-SQW8dhZy9_v694u7w4Mtu+EHSw@mail.gmail.com> <CAH+w=7b4b-FBVbrZ4SWSiqxP4OcuLmzQWjqZ39c6Q-WZzPq60Q@mail.gmail.com> <CAH+w=7ZL+soLWYiKUb1Ej20WHbs7johzVWJ+qEvevLP5tK_Z4w@mail.gmail.com> <CAHLkEDtjqfyXFR7RqXBUVmKc5MwWR2T8zazortvO3ygEphZarA@mail.gmail.com> <CAH+w=7bhfeV0k5y0FtZLTsm_Y5uBU1wLJw7GUVubfxsKopaRDg@mail.gmail.com> <CAHLkEDuo=8MbjYWOmQM5d4uLOzo+BC6XTy=S14-BfeBPMZjysw@mail.gmail.com>
On Mon, Mar 22, 2021, at 3:16 AM, Marlon Richert wrote:
> On Mon, Mar 22, 2021 at 3:46 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > It refers to the completion results being generic, not to the context ... but of course the style can be called anything, it's more the functionality that's in question.
>
> On Sun, Mar 21, 2021 at 1:53 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > +if [[ "${curcontext:-:::}" == ::: ]] &&
> > + zstyle -t ":completion:::::" generic-widgets "$WIDGET"
> > +then
> > + _generic "$@"
> > + return
> > +fi
>
> This feels like a rather roundabout solution. _generic itself already
> checks whether $curcontext is set and then calls _main_complete. Why
> not just do the straightforward thing, and let the widget call
> _generic directly, which in turn will call _main_complete anyway?
Anything else on this?
vq
Messages sorted by:
Reverse Date,
Date,
Thread,
Author