From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27433 invoked by alias); 6 Mar 2013 21:41:06 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17670 Received: (qmail 12097 invoked from network); 6 Mar 2013 21:41:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at m.gmane.org designates 80.91.229.3 as permitted sender) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: Thorsten Kampe Subject: Slow completion Date: Wed, 6 Mar 2013 22:40:41 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-86-49-71-131.net.upcbroadband.cz User-Agent: MicroPlanet-Gravity/3.0.4 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 /usr/bin/cadaver.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 where cadaver/and/ cadaver.exe are returned. But for an "absolute" completion like /usr/bin/cada 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 and /usr/bin/cada 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