Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: compinit causes completion to fail?
- X-seq: zsh-users 17052
- From: TJ Luoma <luomat@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: compinit causes completion to fail?
- Date: Mon, 30 Apr 2012 10:50:28 -0400
- Cc: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- 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==
- In-reply-to: <120430073725.ZM9968@torch.brasslantern.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <E5557D87279D4F42B645D0604939B2C8@gmail.com> <11E3E5A7F06F49C2B05AD5289019FC72@gmail.com> <120429172415.ZM8837@torch.brasslantern.com> <-840557096841281898@unknownmsgid> <120430073725.ZM9968@torch.brasslantern.com>
On Monday, April 30, 2012 at 10:37 AM, Bart Schaefer wrote:
> Future 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.
>
> (Binary search usually takes fewer comparisons than linear search.)
Oh, I know… I remember that from CS101 all those years ago… I actually did group a few of them, but I had a few false positives and negatives (I think due to ~/.zcompdump not being deleted) so eventually I just went to the awfukkit stage of debugging. :-)
> Turns out compinit uses "read" to parse #compdef lines while walking
> $fpath. When IFS=$'\n' the entire line is in the first element of
> the array, so compdef is run with the wrong arguments. Then compdef
> itself uses "read" to parse bindkey output, etc.
>
> I'm not sure if it's worthwhile to fix this as having IFS=$'\n' during
> a whole interactive shell session is likely to cause all sorts of havoc,
> but here's a patch anyway.
FWIW I have used
IFS='
'
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 the 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 this mailing list.
TjL
Messages sorted by:
Reverse Date,
Date,
Thread,
Author