help / color / Atom feed
* [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)


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 @@
 local name nopt xopt format gname hidden hide match opts tag
-local -a gropt sort
+local -a ign gropt sort
-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
 [[ -n "$3" ]] && _lastdescr=( "$_lastdescr[@]" "$3" )

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

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


Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git