From: Thorsten Kampe <thorsten@thorstenkampe.de>
To: zsh-users@zsh.org
Subject: Slow completion
Date: Wed, 6 Mar 2013 22:40:41 +0100 [thread overview]
Message-ID: <kh8d4u$mbp$1@ger.gmane.org> (raw)
Zsh completion has always been kind of slow for me (in comparison to
bash) but I always contributed this to the superior functionality (my
.zshrc is two and a half times as long as my .bashrc).
Today I decided that it had become unbearable and started investigating.
I tested a simple completion like
/us<TAB>r/bi<TAB>n/cada<TAB>ver.exe
The directory completion (usr and bin) was already slow but the
executable (cadaver.exe) took ages.
1. Testing revealed that "setopt path_dirs" was responsible for the slow
directory completion.
The zshoptions manual page says that path_dirs should not apply in the
above case[1] but a Process Monitor log showed that Zsh was actually
searching through the whole executable path.
2. The cause for the even slower executable completion was the following
line suggested by Bart Schaefer[2]
zstyle ':completion:*:-command-:*' ignored-patterns '*.dll' '*.exe'
This works fine for a "relative" completion like
cada<TAB>
where cadaver/and/ cadaver.exe are returned.
But for an "absolute" completion like
/usr/bin/cada<TAB>
there is only cadaver.exe returned which the above completion style
ignores. Since _ignored is at the end of my zstyle completer list, this
results in cadaver.exe only being completed after everything else has
been tried.
Bash in contrast actually completes
cada<TAB>
and
/usr/bin/cada<TAB>
to cadaver with completion_strip_exe set.
I think both issues (path_dirs and inconsistent completion) are actually
bugs.
Thorsten
[1] "Commands explicitly beginning with `/' [...] are not subject to the
path search."
[2] http://www.zsh.org/mla/users/2009/msg00391.html
next reply other threads:[~2013-03-06 21:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 21:40 Thorsten Kampe [this message]
2013-03-07 10:22 ` Peter Stephenson
2013-03-07 11:44 ` Mikael Magnusson
2013-03-07 12:08 ` Peter Stephenson
2013-03-07 16:04 ` Bart Schaefer
2013-03-07 20:33 ` Thorsten Kampe
2013-03-07 23:38 ` Oliver Kiddle
2013-03-08 15:45 ` joe M
2013-03-11 16:21 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='kh8d4u$mbp$1@ger.gmane.org' \
--to=thorsten@thorstenkampe.de \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).