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

Re: Menu selection



Oliver Kiddle wrote:

> ...
> 
> It is an interesting idea. I'm not sure whether or not I'd use it
> or not. With this toggle key for the final patch, we might want to
> have a key which invokes this direct from the command line (as opposed
> to from menu selection).

Hm, yes, hadn't thought about that. (I hadn't thought much anyway, it
just occured to me how simple this is to implement ;-)

> Also, the interactive: prompt should perhaps
> be always displayed when this behaviour is active and not only after
> the first character is added. In fact, I think it would be better to
> use the real prompt for these characters or move the cursor down instead
> of using `[]'.

Yes, but this is problematic. We can't move the cursor into the
statusline (without changes to the zle display code). And on the
command line we have the currently inserted match. One might think
about messing with the command line buffer and restoring it when menu
selection is left, but that didn't seem like a good idea either.

Maybe we should make that modal, in the same way a incremental search
would be modal in menu selection. I.e., if this mode is selected, the
command line is changed to display the string as it is changed. A
non-inserting key would then leave this mode (again, as in isearch)
and display changes to the current match on the line and match
highlighting in the list again.

That would also make it more like isearch in general. It could
probably be viewed as a different kind of `isearch'.

> > Also, the behaviour of send-break (^G) after one has inserted some
> > more characters is arguable. Currently it leaves the additional
> > characters on the line. Maybe the line should go back to the state
> > when menu selection was entered. Or maybe a undo should remove all
> > characters added during menu selection.
> 
> I think the best would be if undo removed all the characters as you
> suggest and backspace could be used to do what undo currently does.
> It'd be nice if backspace worked that way regardless of what undo does.
> Additionally, tab might fill in any further characters common to all
> the remaining matches.

That would probably really look best with the changed command line
display. And, btw.:

  bindkey -M menuselect '^H' undo

works for me.


Bye
  Sven

-- 
Sven Wischnowsky                          wischnow@xxxxxxxxx



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