* Bug: Annoying message when autocompleting "declare -f" in version 5.0.5
@ 2014-01-19 22:43 Tom
2014-01-19 23:47 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Tom @ 2014-01-19 22:43 UTC (permalink / raw)
To: zsh-users
Procedure for zsh 5.0.5:
1. zsh -f
2. rm ~/.zcompdump
3. autoload -Uz compinit; compinit
4. declare<space>-f<space><tab>
5. You'll get a "_typeset:100: bad option: -f" message
The autocompletion still works, but that message is always shown.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug: Annoying message when autocompleting "declare -f" in version 5.0.5
2014-01-19 22:43 Bug: Annoying message when autocompleting "declare -f" in version 5.0.5 Tom
@ 2014-01-19 23:47 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2014-01-19 23:47 UTC (permalink / raw)
To: zsh-users
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 &&
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-19 23:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-19 22:43 Bug: Annoying message when autocompleting "declare -f" in version 5.0.5 Tom
2014-01-19 23:47 ` Bart Schaefer
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).