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 48203
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Marlon Richert <marlon.richert@xxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Proposal: Let compinit make standard widgets with _generic instead of _main_complete
- Date: Sat, 20 Mar 2021 11:09:38 -0700
- Archived-at: <https://zsh.org/workers/48203>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-03/CAH%2Bw%3D7b4b-FBVbrZ4SWSiqxP4OcuLmzQWjqZ39c6Q-WZzPq60Q%40mail.gmail.com>
- In-reply-to: <CAHLkEDuxX39Z7-ioZTgrosL-SQW8dhZy9_v694u7w4Mtu+EHSw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHLkEDuxX39Z7-ioZTgrosL-SQW8dhZy9_v694u7w4Mtu+EHSw@mail.gmail.com>
On Fri, Mar 19, 2021 at 3:24 PM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
>
> How would you feel about changing compinit, so that it rebinds the
> standard widgets with `zle -C $_i_line .$_i_line _generic` instead of
> `zle -C $_i_line .$_i_line _main_complete`?
A potential issue with this is that it introduces a difference for
other wrapper widgets that assume _main_complete is THE completion
entry point. For example, _complete_debug will no longer have an
accurate context as compared to complete-word. That potentially
affects the following other functions:
Completion/Base/Completer/_expand_alias
Completion/Base/Widget/_bash_completions
Completion/Base/Widget/_complete_debug
Completion/Base/Widget/_complete_help
Completion/Base/Widget/_complete_tag
Completion/Base/Widget/_correct_word
Completion/Base/Widget/_expand_word
Completion/Base/Widget/_history_complete_word
Completion/Base/Widget/_next_tags
The ones of most concern are _complete_{debug,help,tag} (it's not
sufficient to simply call _generic inside those functions, because
_generic will insert the name of the wrapper widget into the context)
and of least concern is _bash_completions (which can presumably just
ignore this). I haven't investigated whether any adjustment to the
others is possible or needed.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author