Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Fix `_description -J`
- X-seq: zsh-workers 44767
- From: dana <dana@xxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: [PATCH] Fix `_description -J`
- Date: Wed, 18 Sep 2019 04:15:54 -0500
- Cc: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :cc:to; bh=EvJJfCNxJk1csnmpuMJN6eSLea/2QSXATSeQBtokcvI=; b=Q+QUtQNeqDADbtRDejsI9ea/mGjc5FhAWz+xOticySHOleN11hVUkJc9FpTiC7RXu7 6Y9t4CWBDxAd5oYv5+weQDePk5uozKjc6tvUdId47IUl0UVT+EivoHrzlnlh1Fk4PJLH Tdr7STh70e3ye8C/3YGN+N/Y4RH6w5FDv0EmLeAvM/aIL756bFJj7B/lTPnFnwuOqtgE a1Nw+GirJb9YY2mZiKBVlDiYb2nCIUOOWE5fTsyK7X+UR/TGRjIcLLVHbepUFTcRCTxE hfQDXpqIxjVv7TgOWRJLEJRlmVnE0qOPMvszjDDxt39ggrCExpdz+NFy+uSSVoIt0W7g HR6A==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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" )
Messages sorted by:
Reverse Date,
Date,
Thread,
Author