zsh-workers
 help / color / mirror / code / Atom feed
* Proposal: Let compinit make standard widgets with _generic instead of _main_complete
@ 2021-03-19 22:23 Marlon Richert
  2021-03-20 18:09 ` Bart Schaefer
  0 siblings, 1 reply; 13+ messages in thread
From: Marlon Richert @ 2021-03-19 22:23 UTC (permalink / raw)
  To: Zsh hackers list

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`?
(https://github.com/zsh-users/zsh/blob/f4a248f9d38dc02d65610395f4c7f9a95a5d6612/Completion/compinit#L558)

This would make it easier for the end user to define, for example,
different `menu` styles for different widgets. Without using
`_generic`, the end user cannot out-of-the-box define different styles
for different widgets.

Here's the patch:

diff --git Completion/compinit Completion/compinit
index e81cd1604..212bc7cf3 100644
--- Completion/compinit
+++ Completion/compinit
@@ -555,9 +555,9 @@ fi
 for _i_line in complete-word delete-char-or-list expand-or-complete \
   expand-or-complete-prefix list-choices menu-complete \
   menu-expand-or-complete reverse-menu-complete; do
-  zle -C $_i_line .$_i_line _main_complete
+  zle -C $_i_line .$_i_line _generic
 done
-zle -la menu-select && zle -C menu-select .menu-select _main_complete
+zle -la menu-select && zle -C menu-select .menu-select _generic

 # If the default completer set includes _expand, and tab is bound
 # to expand-or-complete, rebind it to complete-word instead.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-05-10 17:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 22:23 Proposal: Let compinit make standard widgets with _generic instead of _main_complete Marlon Richert
2021-03-20 18:09 ` Bart Schaefer
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

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).