From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18048 invoked by alias); 8 Nov 2011 15:55:37 -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: 16559 Received: (qmail 17067 invoked from network); 8 Nov 2011 15:55:35 -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: <111108075454.ZM3135@torch.brasslantern.com> Date: Tue, 08 Nov 2011 07:54:54 -0800 In-reply-to: <20111108153507.GD1621@x4.trippels.de> Comments: In reply to Markus Trippelsdorf "Re: zsh spinning for ages when I hit tab on directory" (Nov 8, 4:35pm) References: <20111108131022.GA1621@x4.trippels.de> <20111108135809.GB1621@x4.trippels.de> <20111108142146.GC1621@x4.trippels.de> <111108071341.ZM3017__46451.674323953$1320765436$gmane$org@torch.brasslantern.com> <20111108153507.GD1621@x4.trippels.de> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: zsh spinning for ages when I hit tab on directory MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Nov 8, 4:35pm, Markus Trippelsdorf wrote: } Subject: Re: zsh spinning for ages when I hit tab on directory } } > } zstyle ':completion:::::' completer _complete _approximate } > } zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) )' } > } > zstyle -e ':completion:*:approximate:*' \ } > max-errors 'reply=( $(( ($#PREFIX:t+$#SUFFIX:h)/3 )) )' } } Thanks Bart. This fixes the problem. } BTW I copied the lines from the "From bash to Z Shell" book. Ah, yes, well, examples in books tend to illustrate isolated concepts. It's a perfectly good example of how "zstyle -e" works, which in spite of it being introduced in the section on _approximate is really what the authors were getting at. Also it works perfectly well as long as you don't type a really long path to a directory filled with a lot of files. :-) [This problem didn't occur to me as a technical reviewer of the book, either, so ... accept our collective apologies?]