zsh-workers
 help / color / mirror / code / Atom feed
* Smarter matcher-list: skip previous sets
@ 2015-05-18 22:11 Daniel Hahler
  2015-05-19  0:44 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Hahler @ 2015-05-18 22:11 UTC (permalink / raw)
  To: Zsh Hackers' List

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've noticed that my matcher-list setup causes a (possibly expensive)
completion function to be called multiple times, although the input was
not be changed by the matcher-list substitution.

The functrace is:

    _manage.py:4 _manage.py:465 (eval):1 _dispatch:63 _normal:40 _complete:117
    _main_complete:194 _zsh_highlight_widget_complete-word:0 zsh:1

My matcher-list setup:

    zstyle ':completion:*' matcher-list '' '+m:{a-z}={A-Z}' '+m:{A-Z}={a-z}' \
      '+r:|[._-]=* r:|=*' '+l:|=* r:|=*'

I think it would be smart if these calls would be skipped in case the
input has not changed (because it was all lower-case in the beginning).


Regards,
Daniel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iD8DBQFVWmOkfAK/hT/mPgARAoJ2AKCM8iSQ8kaL92BTCT3ojQaxYHp1ywCgzz8Z
GEJGEy+nvPR9VBEbfrdfUDc=
=Q/cu
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-19 22:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-18 22:11 Smarter matcher-list: skip previous sets Daniel Hahler
2015-05-19  0:44 ` Bart Schaefer
2015-05-19  8:50   ` Daniel Hahler
2015-05-19 22:55     ` 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).