zsh-workers
 help / color / mirror / code / Atom feed
* Is _oldlist breaking something it shouldn't?
@ 2014-02-13  6:32 Bart Schaefer
  0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2014-02-13  6:32 UTC (permalink / raw)
  To: zsh-workers

This is less interesting than I first thought, because I didn't catch the
no_automenu interaction the first time around, but since I already typed
most of it ...

On Feb 12,  9:47pm, Bart Schaefer wrote:
}
} The first time you press TAB, if the result is ambiguous (in your
} example, four possible results) a completion listing and the cursor
} is moved to the first disambiguating location.

I've verified by repeated experiment that this is the default behavior
of compsys in emacs mode if you load it with no styles and the default
zsh setopts.  

I've also verified that it works this way if you add a simple completer
style:

    zstyle ':completion:*' completer _complete

And that it continues to work this way if you "unsetopt automenu".

} If you hit TAB again, the same completion that created the listing
} is repeated in order to populate the menu.  If you were to replay it
} in slow motion, you'd see the cursor return to the end of the word
} before the completion is begun, and then jump back to the point of
} disambiguation to insert the first choice from the menu.

As expected, this only works with automenu set.  However, the cursor
remains at the disambiguation point when TAB is pressed again.

Here comes the "is this a bug?" ...

} The _oldlist completer takes explicit advantage of this behavior to
} avoid calling all the other completers when a list has already been
} created.

If I change that completer style to:

    unsetopt automenu
    zstyle ':completion:*' completer _oldlist _complete

Now the cursor returns to the end of the word on the second TAB.  Why
should _oldlist have that side-effect?  Why does it have that side-effect
only when automenu is turned off?


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-13  6:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-13  6:32 Is _oldlist breaking something it shouldn't? 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).