From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27542 invoked from network); 8 Oct 2021 16:13:14 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 8 Oct 2021 16:13:14 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1633709594; b=pkAIR64SAdd8FXoP45Gka4qn5ZxqGgjeH8nXY+0AhU/K0Wvq5P7ByZvxlVUZpim0/DVTrYXJk4 PJQczxAAQKKILGuHssnJ17i0mK9x+LBAOa4WYzfaPnvIP6ISeMBsj5L9Nhl1spzVmh+5xGHmpn umF2xyIuf/JvDVmWyUeKx1z+Ne1FkiMuMMrt0jB3zWzTDKueSCKjGcEMjT55mhRD0y6aIb0b1e hwfXIb3CATMAQit4LGVHC/W294q1D8p8u+KGrh1h5nTSKovwWytFMbXQG4HqzjVfV7R/A2gT6K p2Ah80sqroSWibbGm3VADFVyQWWZJjln7I1q/Kz3Y6sayg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd00008-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.8; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1633709594; bh=USdFrUx0l+UGt8m58ePaeL7DsNAu/x3ff/xDUrPB07E=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:Date:Message-ID:Subject:MIME-Version: Content-Transfer-Encoding:Content-Type:From:DKIM-Signature; b=ZHF8jWBSghhC1BKN5tH5ZKDtTUCC5RsY07lVhQOA5LCIPoLIos4Jvi4cqeGQpmfq04lxllh4GE tN6WlAg9NC9I52PwWADWMYvsMbd9GgaBcaJVUjHmNFpNVHi8tCVGpqHNsphlDM1gjT6/pYEnay vC7Uft3VCM6sCtsXIdnP2eT9HnBUsNz6dLO+r2DowPjsdDedk5HGu2E7hkITU8uUjbogGYWy+k D0U08UnxxRiXxOho4UeLUk7E7F0YpWr38AG9vG+55r6eIM5ugg1wxitEwpELvqnVX7oLmILyHf 60wirFjUo2BD1b3YojKfHtS87BsqnSJJ3k5T5chH+q5zOQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:To:Date:Message-Id:Subject: Mime-Version:Content-Transfer-Encoding:Content-Type:From:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=USdFrUx0l+UGt8m58ePaeL7DsNAu/x3ff/xDUrPB07E=; b=ZPamJLyJEZb5mL88GvNgZxU4l6 Ly1FwvfbRR+rThDkk+qtVzSllnUjJn3hzGt6WIP5oVanIyj/ZdwUWuI+8r47I5mhRn72RcTEEJOBN YIvq41JsKWRtW7eiOF8K7vJP5Pri106QdI7xGBsf0Z2itStiAl6ZaVhGeXgHzjjLcDMqSSCtKw5Nw KLw/Ub+11lSTWtUDljMgKf4SAhYmiAMI+qrIg84eKCW3E7RfIdIJp4bgv7yvYLXc9xXJeiSw0HQ3h 968P0AvHl3BbNTZ1L3Vu3VkwC4ERYfx609f/B0u17tRMiunpkgEjWsYNUZhYbMutGOYDswKZWJmSb WC9GqtpQ==; Received: from authenticated user by zero.zsh.org with local id 1mYsUj-0005U8-Vo; Fri, 08 Oct 2021 16:13:13 +0000 Authentication-Results: zsh.org; iprev=pass (snd00008-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.8; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd00008-bg.im.kddi.ne.jp ([27.86.113.8]:6529 helo=dfmta0012.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mYsUJ-00059r-GE; Fri, 08 Oct 2021 16:12:48 +0000 Received: from mail.biglobe.ne.jp by omta0012.biglobe.ne.jp with ESMTP id <20211008161243347.UQPM.59926.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Sat, 9 Oct 2021 01:12:43 +0900 From: "Jun. T" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: How about separating "_arguments --" into a new function? Message-Id: <4B74EF96-AE73-4D40-ACDD-9999DFFDA1A8@kba.biglobe.ne.jp> Date: Sat, 9 Oct 2021 01:12:42 +0900 To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3445.104.21) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 49465 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Not sure this was discussed before or not: _gnu_generic works rather well for basenc, and '_arguments --' caches the option specs generated from the --help text in a variable _args_cache_basenc. So I created _basenc by % compdef _gnu_generic basenc % basenc % echo ${(F)${(qqq)_args_cache_basenc}} > _basenc and edited _basenc (to add option groups etc.). If we separate the part of _arguments that generates the option specs (around lines 36 - 323) into an auto-loadable function, say help2specs, then we will be able to do something like % help2specs cmd > _cmd (and edit _cmd to improve it) If this seems useful I'll work on it. Or just using $_args_cache_cmd is enough? If _arguments is separated into two, tracing the history by 'git blame' etc. would be a little bit tedious.