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

New completion - redefine widgets instead of rebinding keys RE: pws-22



>
> The stuff for argument handling of zle widgets still has to go in;
> installation and startup of new completion still has to be finalised; I
> still have to write fancier handling for checking whether to install
> functions, maybe; we probably have to change $NUMERIC in zle widgets so
> that it's not set if there is no prefix.
>

Since I've never seen any reply to this, I repeat it here.

My suggestion was, that instead of rebinding keys (as is done currently) we
should simply redefine corresponding widgets. IMHO this has some advantage as

 - makes startup files less error prone. I bet, that every now and then some
user will change completion widget binding after intializing new completion and
then wonder, why does not work. Less noice on zsh-users :-)

 - is keymap independent. I remember some discussions of switching keymaps
on-the-fly. If this will ever be implemented, current way of rebinding single
keymap won't do. Even now you may find itself suddenly starting in Vi istead of
Emacs mode - and wondering, why completion behaves strange.

It makes also compinit more simple. Instead of filtering bindkey output you
simply redefine (always the same) widgets.

Original widgets are always available so it is quite safe.

any comments?

/andrej



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