From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7832 invoked from network); 29 Jun 1999 11:15:28 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Jun 1999 11:15:28 -0000 Received: (qmail 16162 invoked by alias); 29 Jun 1999 11:15:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6911 Received: (qmail 16137 invoked from network); 29 Jun 1999 11:15:01 -0000 Date: Tue, 29 Jun 1999 13:15:00 +0200 (MET DST) Message-Id: <199906291115.NAA17852@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Tue, 29 Jun 1999 14:51:26 +0400 Subject: Re: More local keymaps? Andrej Borsenkow wrote: > I currently have Alt-RETURN (actually, ESC-RETURN) bound to > accept-and-menu-complete. That's fine and nice ... but after last patches it > seems quite wasteful. There are much more places where I'd like to use these > keys ... and I have to reserve it for very special single case. > > What about local keymap for normal menu completion (menucomplete?) It looks > logical - most widgets you'd like to use cannot be used outside of menu > completion in any case. And binding cup -> menu-complete and cdown -> > rverse-menu-complete would give you nice way to scroll through matches even > without menu select. Problem is that currently local keymaps are realy very very local ;-) As soon as we fall back into the main key-read-loop, the local keymap is removed (in fact, widgets installing a local keymap should remove it). However, I agree, that it would be nice to (be able to) do more with local maps. This menu-completion thing is one (small problem: you don't get any visual feedback when menucompletion is started or exited). The vared-option I mentioned is another one. And I would also like to add (initially empty) maps for isearch, execute-named-command and the other builtin widgets which have their own key-loop. > Releated question: how useful would local keymaps be for user defined widgets? > It differs from current 'bindkey -N newkeymap xxx; bindkey -A newkymap main' in > two aspects: Only if we add a way to read a key sequence (and get the widget name as the result). But that may be interesting to have anyway... (so that you can implement real key-loops in shell code). > - it is sparse (is it really?) You do not need to define all possible bindings Yes, really. Look at complist, it defines only a couple of keys. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de