From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9508 invoked by alias); 30 Apr 2012 15:14:38 -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: 17052 Received: (qmail 29611 invoked from network); 30 Apr 2012 15:14:27 -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.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:message-id:in-reply-to:references:subject:x-mailer :mime-version:content-type:content-transfer-encoding :content-disposition; bh=//dXyY0Nyj/OZYsErHm2toJR9fJyGf56ubzvBHewuhY=; b=HH8JbXmZKTB6tqK1rVXjbPpj7A4KZ7dlERvtxsK35T1NYCkm3LhTYmAKb+sXVNWIOt 4KFWtiqBcsmar8oXYPEYpOFIkhswS3pEINwssmrbIay6emoyfbVIcEWH14v0he2fGmsL g5N/VuGVQKpL5zhh1DecF9zGLfnmMxgmNzGx3LJzSBMPjG2vgx985ANeV6cq4jjfp/nP d/ey0B4U19KEu8+XTVkQ0r8KkKBq2dywjV5gMHM1sEaBbf599gryS0TC6SeCRKgr5kYI CdW6qQf9aHk7qmknQQfGGcQX8NVoIMhIklQfmDlJ3ZMvDy7ydPtvOCo5h/YelcxXNYc9 rhTg== Date: Mon, 30 Apr 2012 10:50:28 -0400 From: TJ Luoma To: Bart Schaefer Cc: "=?utf-8?Q?zsh-users=40zsh.org?=" Message-ID: <038C9E295E4749C2B6569F2F9E51367A@gmail.com> In-Reply-To: <120430073725.ZM9968@torch.brasslantern.com> References: <11E3E5A7F06F49C2B05AD5289019FC72@gmail.com> <120429172415.ZM8837@torch.brasslantern.com> <-840557096841281898@unknownmsgid> <120430073725.ZM9968@torch.brasslantern.com> Subject: Re: compinit causes completion to fail? X-Mailer: sparrow 1.5 (build 1043) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday, April 30, 2012 at 10:37 AM, Bart Schaefer wrote: > =46uture hint: Uncomment half the lines, then try. If it works, leave > those uncommented and uncomment half the remaining lines. If it fails, > re-comment half way back to the last place it succeeded. Repeat. > =20 > (Binary search usually takes fewer comparisons than linear search.) Oh, I know=E2=80=A6 I remember that from CS101 all those years ago=E2=80=A6= I actually did group a few of them, but I had a few false positives and = negatives (I think due to =7E/.zcompdump not being deleted) so eventually= I just went to the awfukkit stage of debugging. :-) =20 > Turns out compinit uses =22read=22 to parse =23compdef lines while walk= ing > =24fpath. When I=46S=3D=24'=5Cn' the entire line is in the first elemen= t of > the array, so compdef is run with the wrong arguments. Then compdef > itself uses =22read=22 to parse bindkey output, etc. > =20 > I'm not sure if it's worthwhile to fix this as having I=46S=3D=24'=5Cn'= during > a whole interactive shell session is likely to cause all sorts of havoc= , > but here's a patch anyway. =46WIW I have used I=46S=3D' ' in my .zshrc for ages, and it has actually proven very helpful as far as = parsing arrays, etc. I realize it's not the ideal solution but this is th= e first time that I know of that it has caused a problem. Then again, my usage of zsh is so basic that I may not be attempting some= of the things which would have otherwise caused problems. Thanks again for your time. I can't tell you how many times I've googled = something about ZSH only to find the answer from some online cache of thi= s mailing list. TjL