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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29132 invoked from network); 25 Oct 2021 19:47:55 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 25 Oct 2021 19:47:55 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1635191275; b=YDdnOs2c+usf9g+fsiWPRzuniI7aOu4i6W2j30gdoingh6Z+yJiSqkcVGl9QPHUUEx1SMO6PDP hGHQo6+uIiSCLnDZ03tT8YL1Q8G37k/BvAWGtUtpzoFKBfcprGA1IqA/FyqIUt7GLCgEfW8Z5o cYi+plpmyHwuKcWjV2sm9Krekom7S20SmtyEUveFE1pk/fVCWIefPj4ivbgQqhT+g389iIZDHV 9EKl2MPIbj4Xa4gguOPqDGuC01CspgMS6fn7VLuZ5pUwQx7HdbSosNVHx3b3Rkez7jpxEDRys4 s9cm35GNzFVfBN2pn46jW/Ecf8sYUPwx1ttNE0roQfZGLg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1635191275; bh=Maq4pa1P0C7hNofyu8U/gfY3yVKSrXBVxQR/eThzbeg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=IrLSSvfRXVqNS0O5dDquNrFtRA5OMsgaDXS856ZltlycjR1lb4V5ZMeoGgKGjRrk32k6eoE8np c+hF8upVj9IrrwSCsDEK85pFbuxQumV4iogNJ+xvEX5oi71VYz8nRAVDr5F8p4u1VRfzy4dSJ8 +Ip/r9BLf+oSTL8RsN+p4WXzeGBoJ9J1m84HooSHNSybpvbmhDHxYc3hI5IAnHQAbVIrNExLL+ lTjRZsjrb8whTO9Zk8yxBKLyOoyrOV3S0HLEihcnean1KMv5H6frFrJD/KALlPzG1sCWxKxIDS dxWi69HNsd9EkKs05sYN9gTH+/12Z72zYZ5cRvsvmO+DlA==; 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:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=1qihbNPrQxPkZb2X6aCc2zlHORhO07nuS8NYyh8i0d0=; b=r0YtiUvzKmjUze3zLpFl4h8a8t n/FHxJFD7naFDpKczY5X4SlW5LEG2vLmTk8r0EWYztrMAXyO7WtN6FcQvEppPrPfTA8FxTvXiW4Cz MTRvE5xeLZbB7YfNblhbhIfu53xlw0avWPSJI14hwktGNhKb785JbJlCqjwaDl6qhSDRwJFAyr/qx /I2kr7alUPaJuxW46WJNEbjfDSLSZOfbIVGVXZ+VHf1Q3+mVGJXjy17pV4aBwbxobbXZLd6hx9i65 Jo7dB2qzXyvY7zQaRXiojbnBCF+SYzZ4l5ZcVBhYelQk7R0AMxToNDPfPeNfy7iHPDzv61lFWgOrO YBmIzBaw==; Received: from authenticated user by zero.zsh.org with local id 1mf5wp-000HHc-EX; Mon, 25 Oct 2021 19:47:55 +0000 Authentication-Results: zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out2-smtp.messagingengine.com ([66.111.4.26]:33219) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mf5vq-000Gp1-DB; Mon, 25 Oct 2021 19:46:54 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id ACD7E5C02D0; Mon, 25 Oct 2021 15:46:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 25 Oct 2021 15:46:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:content-transfer-encoding :in-reply-to; s=fm1; bh=1qihbNPrQxPkZb2X6aCc2zlHORhO07nuS8NYyh8i 0d0=; b=EC9zFlMDD1ilkPZbBH/ONKnp67a06LM4C2Q30lmVYRSRjYN9nfPmX7Pg rfKxu3XKdnq6ZuOwLUn0O09uqrZWWW9qPKCALm5oZc89AeEXPYUlJ8f2/gewDVmC geCK1Hifv3KkxD/ADXrepqqZnU5vnsm1Yi25dH9D/I0YAbBDGumqwXcwmxSV6l+k uEoeKh0Vk9zEjxvSTwFUK8I9qMajup2Rqq7YL6wWUmId9uSu6qO2pUqpxhiKDHJc dd9CEMAobO5frfic20FF4bZZv8zQWIs6d88GfovqBQWJyb/lNqy8N+Du8FVhFOt/ mv25LCez+f/BOBaRUo99sLT+aXyJOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=1qihbNPrQxPkZb2X6aCc2zlHORhO07nuS8NYyh8i0 d0=; b=cwpGjcsrY05GPGII8YXslxDOmwTDmLnkcmSiXv7DABvWe2KcRiAK/EGl1 FGd2+ZANWrlYNqsq8m5XqDYHiwx5vkJOs3fM5cPldI0kkUtEtLAKixLSQHlJLQ5b ri/vpB8FnxXn7mXH/22SpgBSb8ODAPJbhd2K0eSnBpQOdkVu7ktc71tZduWfbyNt Qj5TaHpBfCf5kZiggEZngx4ZgeZ4rRz9TczrtWKjHcx3l0G78Dg0Nbj7KfpiOl6Z VA8AfOONFAMklVIyy6vPY5MYA5ZRjZAl71au0NA3L3w8pUkA4QPrZC+P1vrX+QEf fZYwXy+hQMsutCGtmYt5+JcU+KKFQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtugfgjggfse htkedttddtredunecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpefgleehtdffue fhgeeuleefffejgedttdelhedvvdeuiefhvefgvdfghfevvdekteenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdrsh hhrghhrghfrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 15:46:53 -0400 (EDT) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1005) id 4HdQSq4gpPz52D; Mon, 25 Oct 2021 19:46:51 +0000 (UTC) Date: Mon, 25 Oct 2021 19:46:51 +0000 From: Daniel Shahaf To: "Jun. T" Cc: zsh-workers@zsh.org Subject: Re: How about separating "_arguments --" into a new function? Message-ID: <20211025194651.GC8612@tarpaulin.shahaf.local2> References: <4B74EF96-AE73-4D40-ACDD-9999DFFDA1A8@kba.biglobe.ne.jp> <20211012160428.GD17948@tarpaulin.shahaf.local2> <20211017164917.GA30795@tarpaulin.shahaf.local2> <20211021141557.GA16034@tarpaulin.shahaf.local2> <19B5D2FE-1409-4B6C-A89A-F8DCEE9DF69A@kba.biglobe.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <19B5D2FE-1409-4B6C-A89A-F8DCEE9DF69A@kba.biglobe.ne.jp> User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 49525 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: Jun. T wrote on Sun, Oct 24, 2021 at 18:53:52 +0900: > > > 2021/10/21 23:15, Daniel Shahaf wrote: > > > The content > > of ${_args_cache_foo} need to be escaped once for their transit through > > lex.c when _foo will be read by compinit, and once against Ģechoģ's > > treatment of backslashes. > > I know. > But if the output of 'cmd --help' already has '\', for example > --escape replace $ by \$ > then 'print -r' does not work either (if the output of 'print -r' is used > as a spec for _arguments as is). The output of `print -r` should not be used as an _arguments spec as-is; backslashes, colons, and square brackets need to be escaped. > Using (qq) (instead of (qqq)) may or may not help, but then users must > unset RC_QUOTE (before calling print/echo). > But anyway $_args_cache_cmd is just a 'draft' of _cmd, and users > must edit it manually (usually lots of editing are required). > > I'll push the following soon, so feel free to modify/improve it. > LGTM. Thanks, Daniel