* [PATCH] Fix `_description -J`
@ 2019-09-18 9:15 dana
0 siblings, 0 replies; only message in thread
From: dana @ 2019-09-18 9:15 UTC (permalink / raw)
To: Zsh hackers list; +Cc: Oliver Kiddle
I noticed that workers/44274 introduced a bug related to `_description -J`.
When invoked this way, the function now adds -J to expl twice, yielding
something like...
-J -J foo -X 'completing foo:'
... which breaks completion.
Can we simply do this? My brain is too muddy right now to understand the full
implications, but it seems like it should work...?
(Can't remember why i actually wanted to use `_description -J`; just found it
in one of my functions)
dana
diff --git a/Completion/Base/Core/_description b/Completion/Base/Core/_description
index c2a0e080b..bdb4007a6 100644
--- a/Completion/Base/Core/_description
+++ b/Completion/Base/Core/_description
@@ -1,13 +1,13 @@
#autoload
local name nopt xopt format gname hidden hide match opts tag
-local -a gropt sort
+local -a ign gropt sort
opts=()
xopt=(-X)
nopt=()
-zparseopts -K -D -a nopt 1 2 V=gropt J x=xopt
+zparseopts -K -D -a nopt 1 2 V=gropt J=ign x=xopt
3="${${3##[[:blank:]]#}%%[[:blank:]]#}"
[[ -n "$3" ]] && _lastdescr=( "$_lastdescr[@]" "$3" )
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-18 9:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 9:15 [PATCH] Fix `_description -J` dana
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).