From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Bug: Annoying message when autocompleting "declare -f" in version 5.0.5
Date: Sun, 19 Jan 2014 15:47:28 -0800 [thread overview]
Message-ID: <140119154728.ZM5836@torch.brasslantern.com> (raw)
In-Reply-To: <52DC54F8.6040502@archlinux.us>
On Jan 19, 10:43pm, Tom wrote:
} Subject: Bug: Annoying message when autocompleting "declare -f" in version
}
} 2. rm ~/.zcompdump
} 3. autoload -Uz compinit; compinit
You can skip step (2) if you use "compinit -D" there.
} 4. declare<space>-f<space><tab>
} 5. You'll get a "_typeset:100: bad option: -f" message
The following should fix that, though there may be a cleaner or (more
maintable) way:
diff --git a/Completion/Zsh/Command/_typeset b/Completion/Zsh/Command/_typeset
index 0920e3f..f876e1b 100644
--- a/Completion/Zsh/Command/_typeset
+++ b/Completion/Zsh/Command/_typeset
@@ -91,13 +91,13 @@ if [[ "$state" = vars_eq ]]; then
_wanted functions expl 'shell function' compadd -a args
elif [[ -n $onopts$offopts ]]; then
if [[ -n $offopts ]]; then
- args=(${(f)"$(functions +$offopts)"})
+ args=(${(f)"$(functions +${offopts//[^UXkmtTuz]/})"})
else
args=(${(k)functions})
fi
if [[ -n $onopts ]]; then
local -a funckeys
- funckeys=(${(f)"$(functions +$onopts)"})
+ funckeys=(${(f)"$(functions +${onopts//[^UXkmtTuz]/})"})
args=(${args:|funckeys})
fi
if zstyle -t ":completion:${curcontext}:functions" prefix-needed &&
prev parent reply other threads:[~2014-01-19 23:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-19 22:43 Tom
2014-01-19 23:47 ` Bart Schaefer [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=140119154728.ZM5836@torch.brasslantern.com \
--to=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).