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 11490 invoked from network); 31 Mar 2021 07:46:24 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 31 Mar 2021 07:46:24 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1617176784; b=m8BFQjgPgwQTl4DUFdUs5wiMsQohhPle/S0Hx4K5pv1wuKstWdyQ2rbdkljWnP0kXe1HaX5SML TXtunXqPzth+QBih3hKwuH/Gl8CYo++fJY8PQZmJDrtbwi/3tVjd67LJ9AjBAMV85X8Sa8/0gS 3sWiqFuLXGqGzjNgf0IJ5kUYvCj6gX7fKX24v/563gHqn7BueBbBdHmVGU9cb9aUO9RIGRA8pR Cefos6v2bj58AHkz/dlVnhetwe6YJF77ncVVHuzSKylc6wzkCc9aDQrXd0p/2J9CnfzLu+3EBA UOcbp9+CLEFr9QeYTn62oNQfEDuRsNz7Kvc9CCtpR12T+w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (s1.jo-so.de) smtp.remote-ip=37.221.195.157; dmarc=none header.from=jo-so.de; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1617176784; bh=XUPp93ObbuIMW1iHkHGGE1XEED1Rj5Jb+kYKePvlTgM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature; b=dE3Qt1NHqHUDicdXRvt0Wa35gYrTLH9fqwa+CGuflRPd4aTF3u7nUPixNeYovW0Z2Ohkx06lrY c+fXZi9sS/LvTZKMLvYle9Y68cdfin62/SlwCn0q44FjxLN4UsEb3wrBQboB3vK0pr5b6JRPxp 95ZzVWZ6uVtyR5/xO3s2xKswUDSXxVCp0/NNBMaoPA/Fopt0DASqUzRSmZt0GEl88JAZS12F6U TOjhVEJzg8NTM/KVzN/WLBgYrluzh+/U++3QLlE2X1pS7/nO9O7XImwq/WpOdMMHaJ4jZhJCsv W6g3wOhnMHeF7GjLiVsiGbnCmjYeYBQgJJPXc3nUuIwKMQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Xj5vb/K9jCOgGSo5gKqJro7SqUU9ibUvez9VQQTx09I=; b=Uoe5P6Yw93Gyi9hocShDiQo9uh BwHpZ5i4rZxXNUIj/PDQ+gTiMN5BfcdXXmOWdZpg+ns06wsPdbKtsQd/aUi2k8VwWK9b/S+Xzl/Eu mDeelu+cvXnMF5lfhZEqCFt2Ymn4bLAdAU6d/txAOfcI0M60VqqGuOOwfPxFkJXJLAWv41IB0ftVV MGv5gTMzxB1RHURT6BtEnqnnfjHStucAMYWKwyJCFcNOXGDqH7LjTMokBu1yugDfzd7EsP97pNm6W n1ZfPV8C4wRTYInlW7JZZComj5K8FEevKcMQysxln1pzwQjCkld/kt0DoQuwZs6aqY2+/QEZ6jlzp Zts/511Q==; Received: from authenticated user by zero.zsh.org with local id 1lRVYS-000B4e-Qs; Wed, 31 Mar 2021 07:46:20 +0000 Authentication-Results: zsh.org; iprev=pass (s1.jo-so.de) smtp.remote-ip=37.221.195.157; dmarc=none header.from=jo-so.de; arc=none Received: from s1.jo-so.de ([37.221.195.157]:41519) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lRVXy-000Aid-IV; Wed, 31 Mar 2021 07:45:51 +0000 Received: from mail-relay (helo=jo-so.de) by s1.jo-so.de with local-bsmtp (Exim 4.92) (envelope-from ) id 1lRVXx-0000jt-SJ; Wed, 31 Mar 2021 09:45:49 +0200 Received: from joerg by zenbook.jo-so.de with local (Exim 4.94) (envelope-from ) id 1lRVXw-00HZo8-Vg; Wed, 31 Mar 2021 09:45:48 +0200 Date: Wed, 31 Mar 2021 09:45:48 +0200 From: =?utf-8?B?SsO2cmc=?= Sommer To: Oliver Kiddle Cc: zsh-users@zsh.org Subject: Re: How to get all tagets for rake completion? Message-ID: <20210331074548.b47tt6d2ekjrwdrs@jo-so.de> OpenPGP: id=7D2C9A23D1AEA375; url=https://jo-so.de/pgp-key.txt; preference=signencrypt References: <20201215125724.b6qdvvuhr2mwpxbz@jo-so.de> <1047872238.2253883.1608052325319@mail2.virginmedia.com> <20201215214027.a3htwtas6su3fhz5@jo-so.de> <43486-1617149414.412147@zBmo.ESTa.9XAh> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lje24wma5itt2ygw" Content-Disposition: inline In-Reply-To: <43486-1617149414.412147@zBmo.ESTa.9XAh> X-Seq: 26618 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: --lje24wma5itt2ygw Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: How to get all tagets for rake completion? MIME-Version: 1.0 Oliver Kiddle schrieb am Mi 31. M=C3=A4r, 02:10 (+0200): > On 15 Dec, J=C3=B6rg Sommer wrote: > > > > I would like to get all targets for the completion of rake argument= s. How > > > > can I inject an argument to the targets query call or how to replac= e it? I > > > > have to pass `-A` to *rake* to get the arguments for the completion. >=20 > Sorry that this patch didn't receive any attention earlier. No problem. Don't worry. > To try to understand this, what is the disadvantage of calling rake with > -A? Does that make it much slower or is it that most users wouldn't want > "uncommented" targets? It gives a much huger list and might contain many entries someone will never use. But I don't know what's common. From my point of view I prefer more than less. > Incidentally, _rake doesn't seem to complete the -A option so that must > be newish. I found this commit: https://github.com/ruby/rake/commit/72ac1327d82d85daed68220700ea6873d5b76fe6 =66rom Oct 16, 2012 included in tag rake-0.9.3. I think it's old enough the= be seen as commonly available. > > What do you think about the attached commit? Is it fine or should I cha= nge > > anything? >=20 > When looking up the style, you should include the tag in the context > when one is applicable, so ":completion:${curcontext}:targets" in this > case. Ah, okay. I must admit, I've never used zsytle queries before. I would make this change, right? - zstyle -t ":completion:${curcontext}" all-targets && all=3D-A + zstyle -t ":completion:${curcontext}:targets" all-targets && all=3D-A > As a general principle, it is better to use a style name that has a > generic meaning. I can't find any existing style along the lines of an > extra-matches, more-matches, allow-slow-generation etc so unless I've > missed one you'd need to invent a suitable one. "all-targets" is too > specific to targets. How about =E2=80=98verbose=E2=80=99? --=20 Wer geliebt, kann nicht vergessen, Wer vergisst, hat nie geliebt, Wer geliebt und doch vergessen, Hat vergessen, wie man liebt! --lje24wma5itt2ygw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJMEAREIADsWIQS1pYxd0T/67YejVyF9LJoj0a6jdQUCYGQoqx0YaHR0cHM6Ly9q by1zby5kZS9wZ3Ata2V5LnR4dAAKCRB9LJoj0a6jdQz8AP4gl1HpdYwhz+CqeKQZ m5jnUTxpr4Mg4K34oAjLlH1OrwD/QFGur2ZsVeagSdtK4jDMpAaNXVtR0iCc6lko qYdUbHc= =uK2g -----END PGP SIGNATURE----- --lje24wma5itt2ygw--