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=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 d7ebaf69 for ; Sat, 2 Nov 2019 06:59:19 +0000 (UTC) Received: (qmail 10251 invoked by alias); 2 Nov 2019 06:59:13 -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: 44886 Received: (qmail 15184 invoked by uid 1010); 2 Nov 2019 06:59:13 -0000 X-Qmail-Scanner-Diagnostics: from mail-yw1-f66.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25615. spamassassin: 3.4.2. Clear:RC:0(209.85.161.66):SA:0(-1.9/5.0):. Processed in 1.694607 secs); 02 Nov 2019 06:59:13 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.161.66 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Vt1LKCgf0YvzfxAfhWRQvLWmv+PI4Me4ur4eYLhyzl0=; b=U11QhQpIAfKPJMtzCVGKIvNbjXOpbQQ8UseanaZTAF2rmcLdU83ca6/40OaDlqFHMu /v0msCfUs5JzKhqRdHGM/kO9vzSHnFKzvK4wHEj5baNvYFOfZWEg7PmkeBD+Sp5BVSlK qsWjLkfz/80Gv0JVOrdGk+d28y3tsAP7O4FHzmFjN5oaAS1jPMKmU8na7AIyjT3Q+AHq j54LSnpHx9erOL02shd8ykt9HcfQ6PeeTSTPS4uZV5thMyeDPh5V0QYUoFBPjb0SCV0F ubuooLd6Yfn4J8ZxBDt9xrB9Tuc2tJs7jPrscw/o4WHsjqUUB+lBtCqTxjGxpMI6xLzP pjxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Vt1LKCgf0YvzfxAfhWRQvLWmv+PI4Me4ur4eYLhyzl0=; b=I6IV7zZZ9GmMJndYOU00z2RrR0uigQF8yTPCJYWjRT8qRM7264zXBfRdBrfKFWO9GA 0FoCkJZos2pDXYfiBl1KvRDetl44yTPLfLKwva57Q/RllffVQZIQRQV+a84PhnrLY8tL xHsOlf2EGMrRfSDsEwOawpLOJKRgt2VTVb8hkmvQaRDIhroJq2h/Q/14A0PVwhoeGhfV FS96shTItNcO6yjIG1m3SrcGnH5OZQvSKoo/iMgnfKRxE5D8ja70//CNozEYtl/62/09 YYhCMlM6VNtLeaIBMZ2qscYeQKHNSdjTv1VPWn+XtghqCe2X3sgZEA0+u2dNBNU8xTlz luXA== X-Gm-Message-State: APjAAAWP9l04Cs/hoEJgpsor7vdYhbYHXuA9myRQMgJSZFHLShYl677/ 1NrExyT8JQ+r6kbgamgxrliBqg== X-Google-Smtp-Source: APXvYqzQ0B3suHf71kP5uPnFKksGa+ASTFEJ3NQkhnVtJpqYphvBk1B8hnlVwYxhGw4XYb0q5c6Kdg== X-Received: by 2002:a81:ae19:: with SMTP id m25mr1089759ywh.167.1572677918678; Fri, 01 Nov 2019 23:58:38 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH] Completion: Add _log_priorities, _logger From: dana In-Reply-To: <4D918504-B8F4-46D5-9F04-8B223A56FDEE@dana.is> Date: Sat, 2 Nov 2019 01:58:37 -0500 Cc: Zsh hackers list Content-Transfer-Encoding: 7bit Message-Id: <95142696-7C02-4969-8F55-719FEAF646D8@dana.is> References: <20191102055423.5gzbipni3vnjo4k3@tarpaulin.shahaf.local2> <4D918504-B8F4-46D5-9F04-8B223A56FDEE@dana.is> To: Daniel Shahaf X-Mailer: Apple Mail (2.3445.104.11) On 2 Nov 2019, at 01:45, dana wrote: > That would definitely work, and be easy to parse, though it is a bit > unattractive, especially given how these functions are often called. Oh, i realised with your *very* first suggestion, the quoting wouldn't be quite as bad: '--foo=[specify foo]: :_my_type -Y-a -Y"my optarg" -Y-bcd' Though it's certainly strange in a different way. It would be cool if there was a convenient way to just have a general prefix for options, so that this kind of thing would work: '--foo=[specify foo]: :_my_type -Ya "my optarg" -Ybcd' (The point being that (a) you don't have to repeat the hyphens and (b) it knows that "my optarg" is an argument to the type function's -a.) Maybe zparseopts could be extended to do that somehow, if it's not too silly of an idea. dana