From: TJ Luoma <luomat@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: "zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: compinit causes completion to fail?
Date: Mon, 30 Apr 2012 10:50:28 -0400 [thread overview]
Message-ID: <038C9E295E4749C2B6569F2F9E51367A@gmail.com> (raw)
In-Reply-To: <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
prev parent reply other threads:[~2012-04-30 15:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-29 5:21 TJ Luoma
2012-04-29 6:57 ` TJ Luoma
2012-04-29 18:29 ` Peter Stephenson
2012-04-30 0:24 ` Bart Schaefer
2012-04-30 5:04 ` TJ Luoma
2012-04-30 14:37 ` Bart Schaefer
2012-04-30 14:50 ` TJ Luoma [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=038C9E295E4749C2B6569F2F9E51367A@gmail.com \
--to=luomat@gmail.com \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).