From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4794 invoked by alias); 19 Jan 2014 23:47:26 -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: 18335 Received: (qmail 10099 invoked from network); 19 Jan 2014 23:47:20 -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 From: Bart Schaefer Message-id: <140119154728.ZM5836@torch.brasslantern.com> Date: Sun, 19 Jan 2014 15:47:28 -0800 In-reply-to: <52DC54F8.6040502@archlinux.us> Comments: In reply to Tom "Bug: Annoying message when autocompleting "declare -f" in version 5.0.5" (Jan 19, 10:43pm) References: <52DC54F8.6040502@archlinux.us> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Bug: Annoying message when autocompleting "declare -f" in version 5.0.5 MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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-f } 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 &&