From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id ed622516 for ; Sat, 22 Dec 2018 08:07:50 +0000 (UTC) Received: (qmail 9559 invoked by alias); 22 Dec 2018 08:07:32 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43928 Received: (qmail 12455 invoked by uid 1010); 22 Dec 2018 08:07:31 -0000 X-Qmail-Scanner-Diagnostics: from mail-it1-f195.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(209.85.166.195):SA:0(-1.9/5.0):. Processed in 3.240549 secs); 22 Dec 2018 08:07:31 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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 :to; bh=X0GV3xapP994O52u4PfQMEqzDqufO/6irLvFRUWpLTI=; b=L6ogbm2v3U3c68Zhmq/cgUElHqic5mna0/riTpLeiPcrPmGuuPrK0Qe4uFq8vYFNQ8 LsM/9z827QgiV/ikUez6sPaS5hnvFj5DVebtFf7j9zbdnSDh/Z7sB0hHk4s6NNrWWW1p JPO418PpPgQHt6gUmscYSqGlo0qsEQ5mOCERGDst1cIxY8SinPGedLMjt2ggZesWX4Dw d6QIEy6AmMUOkk9BeF9FaknS9ZveXkroSepHKD9VM9qtBCxIIEZbBbRyfRC3EASkrZSt UZhR55JXb3fMiYzyfUE7FndGEQpvmZuw7erRJ2t9eV+AIcPk8PlEaa6z5ZuCKiIOarXU 87oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=X0GV3xapP994O52u4PfQMEqzDqufO/6irLvFRUWpLTI=; b=Eruaf+EASb6LAzK13tG78oh3f7oKXGYF9dxHVnowFvf1Yvw1PQMfPGQFa9HSnYlkU3 guaGbT9O4uA6GGdklmvFwyJb1zjy1PFUifMPeEU+ZjvQMY5L7R+u+jtL0m5ctSSq871U QF3mC299+ASSKucAEWjsXbhB23E9bdTGNM3Dn278vRZpdA5iVZBRyQd3rd7jKOv7JvE1 +7ktBmV0q5OnAlS7SJxk5uFYLHFcq4iAV8zyi/chZ/tuOfoihZxCUoznymmWeVow2AuU ITWQC0eFL2AX+OJSgJ3HRpy5uaNOVOMsv6AbJi0CEXTt2N5AC34xAVdzKiRnkmq9o2Cb qZxw== X-Gm-Message-State: AJcUukeJo2ZyytvlzFx/mboR4nHPQofSrvtOhN7/wC4vHKNkGMaLt/X6 4g+aO/taEfCLGUNCvi7HuwV+W/qleMPesg== X-Google-Smtp-Source: AFSGD/Xq3+Z7IUnkoOJbhlt8kVvbyCClHA3grD0Rerw8utW4zjX4oNLtxDxz5RK+vHH1wgLwoguY2w== X-Received: by 2002:a24:cb02:: with SMTP id u2mr3504344itg.87.1545466045413; Sat, 22 Dec 2018 00:07:25 -0800 (PST) From: dana Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: [PATCH] _alternative: Fix (...) action syntax Message-Id: <63EB5582-5C27-4D27-9822-532C3CFB5D32@dana.is> Date: Sat, 22 Dec 2018 02:07:24 -0600 To: Zsh workers X-Mailer: Apple Mail (2.3445.100.39) A long time ago Oliver found that _alternative didn't handle the = ((...\:...)) action syntax properly, and that was fixed in workers/18347. But it also didn't handle (...) properly, and i think the same kind of fix is = probably warranted (just copy/paste from _arguments basically). So here's that PS: Sorry for bug/patch spam, lots of unstructured holiday free time = here dana diff --git a/Completion/Base/Utility/_alternative = b/Completion/Base/Utility/_alternative index bfb34a604..3c61d1125 100644 --- a/Completion/Base/Utility/_alternative +++ b/Completion/Base/Utility/_alternative @@ -43,8 +43,10 @@ while _tags; do =20 # Anything inside `(...)' is added directly. =20 + eval ws\=3D\( "${action[2,-2]}" \) + _all_labels "${def%%:*}" expl "$descr" \ - compadd "$subopts[@]" - ${=3Daction[2,-2]} + compadd "$subopts[@]" -a - ws elif [[ "$action" =3D \{*\} ]]; then =20 # A string in braces is evaluated.