From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4999 invoked by alias); 7 Mar 2013 16:05:22 -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: 17675 Received: (qmail 9708 invoked from network); 7 Mar 2013 16:05:17 -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 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130307080445.ZM12249@torch.brasslantern.com> Date: Thu, 07 Mar 2013 08:04:45 -0800 In-reply-to: Comments: In reply to Thorsten Kampe "Slow completion" (Mar 6, 10:40pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Slow completion MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Mar 6, 10:40pm, Thorsten Kampe wrote: } } 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. I'm not a regular cygwin user (in fact it's probably been 15 years since I even touched a box with cygwin, now that I think about it) so you'll have to (a) forgive any inaccuracies and (b) remind me how it is that "cadaver" gets into the "relative" completion list in the first place, since it is not a file on disk. However, I think it's wrong to assert this is "inconsistent" completion. You're not completing the same thing. I'm pretty sure "cada" is being completed for the "path-commands" group, while /usr/bin/cada is in the "executables" (executable file or directory) group. The latter uses file completion rules, which are being applied quite consistently. } Bash in contrast actually completes } } /usr/bin/cada } } to cadaver with completion_strip_exe set. Well, yes. Stripping the ".exe" off the matches when inserting into the command line is a different operation from ignoring any matches that contain the ".exe" suffix. It might be possible to get the effect of completion_strip_exe with a matcher style, something like (though I don't think this works) zstyle ':completion:*:-command-:*' matcher \ 'R:|.[eE][xX][eE]=.[eE][xX][eE]' but I'm not really an expert with the matcher syntax and all the doc examples are for left-anchored rather than right-anchored patterns.