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

Re: PATCH: completion listing (was: zsh hangup with listpacked and Problem with zle completion listing function)



Sven wrote:
> Peter Stephenson wrote:
> > I have the following function set up as an ordinary zle widget, with zle
> > -N, and bound to ^D.  It's supposed to make sure that when I type ^D I
> > always get a freshly calculated list, so that I can list the contents of a
> > directory which appears with menu completion --- otherwise it will just
> > redraw the current menu list.  (Of course, what I *really* want is
> > something smarter: if a list is already displayed, assume I want it updated
> > based on what's currently on the command line, but I couldn't work out how
> > to do that.)
> 
> Hm. I don't exactly understand how this would differ from your
> version...?

If a list wasn't displayed, it should do what it currently does, displaying
the relevant list for the active completion.  It's extremely minor --- I
have autolist on, so I get the list willy-nilly.
 
> I can't reproduce this. I tried it with and without autolist and with
> and without _oldlist in the completer list. Even if the patch below
> fixes the main problem I'd like to be able to track this down.

It does fix the problem, thanks.  _oldlist was the reason I needed to hit
^D twice.  Setting the old-list style should fix this, although I haven't
worked out if that's going to make me cross somewhere else.  So at the
moment everything is now working.
 
The completers I had, by the way, were

zstyle ':completion:*' completer _oldlist _expand _complete _approximate

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070



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