From: Bart Schaefer <schaefer@brasslantern.com>
To: Marlon Richert <marlon.richert@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Proposal: Let compinit make standard widgets with _generic instead of _main_complete
Date: Sat, 20 Mar 2021 11:09:38 -0700 [thread overview]
Message-ID: <CAH+w=7b4b-FBVbrZ4SWSiqxP4OcuLmzQWjqZ39c6Q-WZzPq60Q@mail.gmail.com> (raw)
In-Reply-To: <CAHLkEDuxX39Z7-ioZTgrosL-SQW8dhZy9_v694u7w4Mtu+EHSw@mail.gmail.com>
On Fri, Mar 19, 2021 at 3:24 PM Marlon Richert <marlon.richert@gmail.com> 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.
next prev parent reply other threads:[~2021-03-20 18:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 22:23 Marlon Richert
2021-03-20 18:09 ` Bart Schaefer [this message]
2021-03-20 23:52 ` Bart Schaefer
2021-03-21 15:19 ` Marlon Richert
2021-03-22 1:46 ` Bart Schaefer
2021-03-22 7:16 ` Marlon Richert
2021-04-03 19:37 ` Lawrence Velázquez
2021-04-04 18:35 ` Bart Schaefer
2021-04-04 19:31 ` Bart Schaefer
2021-04-09 19:11 ` Oliver Kiddle
2021-04-09 19:35 ` Bart Schaefer
2021-05-09 20:51 ` Lawrence Velázquez
2021-05-10 17:11 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7b4b-FBVbrZ4SWSiqxP4OcuLmzQWjqZ39c6Q-WZzPq60Q@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=marlon.richert@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).