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 17769 invoked from network); 12 Apr 2021 08:09:34 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Apr 2021 08:09:34 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1618214974; b=uZ3YIs+gC8JlRxi7FNGLjAgjNDR5KY1nb8zT6oa06qQD4MlzCuUJ+KkFBUbkpWvY2jXmm/KB1g 2j4JLASFWPx9yin5pxZcCCHD0dIN3CmBBgb0vQa2BaRghzyS0DvsTKCbS0g+qIuYcg6Xo/QfTA KU40Q+1zn4XD86UPMtUWj/qa0/psLkW6o3QHCN+q+Qq1EPiCxJUcKeWr0dpYnmW/FWzYRIjJz6 Rn9+baCuhrDAMWl83ZMakveVaRRU477l9RWZ872El/saW3YlAy1lAvW7kHat5FA1JIjxv6t+TI VeKUFGfOVZOtQ3jOBk57F/qb5LZmfxvfj6sdwZVKj0iIkQ==; 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=1618214974; bh=5BXc9pbqNgOhtUQFzM2h0iAXtL53o2j5/F4HhkPbZfg=; 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=I+4KBl+gVDghIX6HVSQdKrjNztcyZMSekeCGjdgjxzU+Dy7aYzVTPXlCc6c/T6d8/n6N+6M4gr 9q82RMAY+jlOSdVPJI/mOc46O1BUZq85tEAUyt5AIngJVWv0QQRWLftARTkvwMNzKSPMvUWVqp VJIMpoXEIeauQ5ByfqZtRAI3PUb9hbNG7peQCxkp5jBl/dtPr32mDlrR0q9OHRJn8rKgGsN/a5 3FVGmLMouKOXtzXLJNFqZVgdeRC6Fvg8BNMM6uboip9ovBrvuHkhKhneM9bE6rDttYPZkgubcq AkIR+8sASdPELdPqeh+qIM0wGFI7jvJSi16i4Z3+b3lNJQ==; 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=s2u+FlCAvD+7IsGMkN6FfN2joQxw5Q02XoFZcMW6nVI=; b=fPAkxuhVaRkzkG8UXCpVMbfhsr IF0ZLqkqk/OspGhtbI3cTr9bFJw7qLB7cx7RQfw/fnhBZj5MP74rELRiSDhz8WK8dcqmZzdzsnCyO BVzRgmhQ30EwPGH+lgOzi/kbCCjbosCnCTzKeviwO8ioL+XB4siJisrrBYqKXL1vPi26W/VB8lYmq +Y/iJ1876ITI7RtmC13Icqz4Qtex9SHBWjj/uxx1ZjDWeZdd1Ty0i+MG5WIEKUaRqwLQZeqVhwH52 oFHAYYEJx3RjHT8SSQH0vBXHSSwtgVcnDiCokeBPy9ZYR41lP7tmdHvbMmTfitra1U+PsVBd4lhwk ROSPLBqw==; Received: from authenticated user by zero.zsh.org with local id 1lVrdR-000PTe-TN; Mon, 12 Apr 2021 08:09:29 +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]:58485) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lVrbs-000OrX-Ha; Mon, 12 Apr 2021 08:07:53 +0000 Received: from mail-relay (helo=jo-so.de) by s1.jo-so.de with local-bsmtp (Exim 4.92) (envelope-from ) id 1lVrbq-00012a-NB; Mon, 12 Apr 2021 10:07:50 +0200 Received: from joerg by zenbook.jo-so.de with local (Exim 4.94) (envelope-from ) id 1lVrbi-000XnC-Cc; Mon, 12 Apr 2021 10:07:42 +0200 Date: Mon, 12 Apr 2021 10:07:42 +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: <20210412080742.rxx5gofqhphtuehn@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> <20210331074548.b47tt6d2ekjrwdrs@jo-so.de> <53310-1617184228.244862@cFeP.EmJg.7ARq> <20210404082835.pwkfkoprksgluuqz@jo-so.de> <54621-1617918703.747482@gwX8.ONTM.cKuV> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3ii45atrl77s7kac" Content-Disposition: inline In-Reply-To: <54621-1617918703.747482@gwX8.ONTM.cKuV> X-Seq: 26649 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: --3ii45atrl77s7kac Content-Type: multipart/mixed; protected-headers=v1; boundary="tnt6nwaregsvvyw6" Content-Disposition: inline Subject: Re: How to get all tagets for rake completion? MIME-Version: 1.0 --tnt6nwaregsvvyw6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Oliver Kiddle schrieb am Do 08. Apr, 23:51 (+0200): > On 4 Apr, J=C3=B6rg Sommer wrote: > > > The existing `verbose` style is usually used to conditionally add > > > descriptions to matches, especially where generating those descriptio= ns > > > is slow or where they're of questionable value. > > > > And how about =E2=80=98expanded=E2=80=99 or =E2=80=98extended=E2=80=99? >=20 > Either of those are fine. Though you've not commented on the approach of > inverting the sense of the style and using ignore- which I > think I prefer but I don't know rake so well. I think rake is like make and I guess they show the uncommended tasks only with `-A` for the same reason as make can have many internal targets they aren't of any external use. I would choose the approach of enabling the additional output which matches the behaviour of rake. > Just pick whatever you think is best and update the patch with that and > it should then be good to commit. So here it is. Regards J=C3=B6rg --=20 =E2=80=9EGesundheit ist dasjenige Ma=C3=9F an Krankheit, das es mir noch er= laubt, meinen wesentlichen Besch=C3=A4ftigungen nachzugehen.=E2=80=9C (Friedrich N= ietzsche) --tnt6nwaregsvvyw6 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Completion-_rake-add-zsytle-for-targets-without-desc.patch" Content-Transfer-Encoding: quoted-printable =46rom 6ba3068957f3ba555f6290f31abd07ada36cd237 Mon Sep 17 00:00:00 2001 Message-Id: <6ba3068957f3ba555f6290f31abd07ada36cd237.1618214528.git.joerg@= jo-so.de> =46rom: =3D?UTF-8?q?J=3DC3=3DB6rg=3D20Sommer?=3D Date: Tue, 15 Dec 2020 22:32:46 +0100 Subject: [PATCH] Completion/_rake: add zsytle for targets without descripti= on `rake -T` shows only these targets having a description. But it might be useful to see all. Allow this with the zsytle setting: zstyle :completion::complete:rake:argument-rest:targets extended true --- Completion/Unix/Command/_rake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Completion/Unix/Command/_rake b/Completion/Unix/Command/_rake index 8814edaa5..10d621991 100644 --- a/Completion/Unix/Command/_rake +++ b/Completion/Unix/Command/_rake @@ -37,7 +37,9 @@ case "$state" in ;; target) local -a targets - targets=3D( ${${(f)"$(_call_program targets $words[1] -sT $opt_args[(I= )(-N|--nosearch)] ${(kv)opt_args[(I)(-f|--rakefile)]} 2>/dev/null)"}/(#b)ra= ke ([^ ]##) ##\# (*)/${${match[1]}//:/\\:}:${match[2]:l}} ) + local all + zstyle -t ":completion:${curcontext}:targets" extended && all=3D-A + targets=3D( ${${(f)"$(_call_program targets $words[1] $all -sT $opt_ar= gs[(I)(-N|--nosearch)] ${(kv)opt_args[(I)(-f|--rakefile)]} 2>/dev/null)"}/(= #b)rake ([^ ]##) ##\# (*)/${${match[1]}//:/\\:}:${match[2]:l}} ) if (( ! ${targets[(I)rake aborted!]} )) then _describe -t targets 'rake target' targets && ret=3D0 else --=20 2.31.0 --tnt6nwaregsvvyw6-- --3ii45atrl77s7kac Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJMEAREIADsWIQS1pYxd0T/67YejVyF9LJoj0a6jdQUCYHP/zB0YaHR0cHM6Ly9q by1zby5kZS9wZ3Ata2V5LnR4dAAKCRB9LJoj0a6jdaZPAQCN+LBexPi8PjxARzKD GAerUKU7eRAIdt9xxH9SiSFs7wD/UsFsdh/sKUsf0y19rphESX0KVlh7XaeQl59l k6sgO9I= =gYVO -----END PGP SIGNATURE----- --3ii45atrl77s7kac--