From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23460 invoked by alias); 28 Jan 2017 17:34:58 -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: X-Seq: 40435 Received: (qmail 19324 invoked from network); 28 Jan 2017 17:34:58 -0000 X-Qmail-Scanner-Diagnostics: from ppa03.princeton.edu by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(128.112.128.214):SA:0(-5.5/5.0):. Processed in 2.065997 secs); 28 Jan 2017 17:34:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-5.5 required=5.0 tests=RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: zhimingw@princeton.edu X-Qmail-Scanner-Mime-Attachments: |signature.asc| X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at princeton.edu designates 128.112.128.214 as permitted sender) From: Zhiming Wang To: Zsh hackers list Subject: Completion of swift fails when swift(1) is from Apple, not OpenStack Thread-Topic: Completion of swift fails when swift(1) is from Apple, not OpenStack Thread-Index: AQHSeYzTcVxDDDNpXEmwRMVDr6Vcag== Date: Sat, 28 Jan 2017 17:34:51 +0000 Message-ID: <9787F242-39F4-4151-85A1-3F6A109A9FB1@princeton.edu> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [140.180.188.12] Content-Type: multipart/signed; boundary="Apple-Mail=_D2948073-8F92-4C0C-A584-3C9FDA7BD0E4"; protocol="application/pgp-signature"; micalg=pgp-sha512 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-01-28_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=quarantine_notspam policy=quarantine score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1701280179 --Apple-Mail=_D2948073-8F92-4C0C-A584-3C9FDA7BD0E4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I was giving Apple's Swift programming language a try just now, and was surprised to find out zshcompsys doesn't play nicely at all with = swift(1) -- it fails with an error. Reproducer: with no swift(1) installed or swift(1) from Apple: $ autoload -Uz compinit; compinit $ swift _values:compvalues:10: not enough arguments $ swift and using _complete_debug (here[1] is the full log) I easily located the culprit, _openstack, which was added in commit 89e319f34 and binds as = many as 23 commands, including swift. 89e319f34 was first shipped in Zsh 5.3 in December 2016. It makes assumptions about what swift --help should = print, and fails ungracefully when its expectations are off. Now that the conflict is obvious, I wonder what's the best course of action. For the reference, Swift is growing in popularity very rapidly; = it ranked #14 in 2016 on GitHub's list of most popular languages.[2] I = don't know how popular OpenStack is, let alone one of the 23 commands of its = command-line client, but I doubt it can beat *the* language of Apple platforms going forward. Zsh 5.3 hasn't been out for very long, and Swift developers = probably haven't picked it up, since the latest version of macOS, 10.12.3, = bundles Zsh 5.2. I'm afraid many people, who may not know how to program Zsh's = compsys, will be in for a big surprise when Apple bundles Zsh 5.3+ in the next = major macOS release. Therefore, I suggest unbinding swift from _openstack. OpenStack folks = can always bind it back with compdef _openstack swift. [1] https://gist.github.com/5a08aec1a4184325e0f2b52931473f92 [2] https://octoverse.github.com/ =46rom 6563808d7bec41f66cf7e3b181e75ed19d32f2ac Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Fri, 27 Jan 2017 22:23:35 -0500 Subject: [PATCH] _openstack: unbind swift The name swift conflicts with the Swift compiler, the programming = language for Apple platforms (swift.org), which is arguably much more popular. OpenStack folks who need completion for their swift could always bind it = back: compdef _openstack swift --- Completion/Unix/Command/_openstack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Completion/Unix/Command/_openstack = b/Completion/Unix/Command/_openstack index 39fa30c3a..69e492156 100644 --- a/Completion/Unix/Command/_openstack +++ b/Completion/Unix/Command/_openstack @@ -1,4 +1,4 @@ -#compdef openstack aodh barbican ceilometer cinder cloudkitty designate = glance gnocchi heat ironic keystone magnum manila mistral monasca murano = neutron nova sahara senlin swift trove +#compdef openstack aodh barbican ceilometer cinder cloudkitty designate = glance gnocchi heat ironic keystone magnum manila mistral monasca murano = neutron nova sahara senlin trove # https://wiki.openstack.org/wiki/OpenStackClients # = http://docs.openstack.org/user-guide/common/cli-install-openstack-command-= line-clients.html -- 2.11.0 --Apple-Mail=_D2948073-8F92-4C0C-A584-3C9FDA7BD0E4 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYjNY6AAoJEFtY+V7JWWXYYnUP/AlUd7P44Cf5weHW4bsoGkKC P+icKpTTfv822sNlXrVwkySAVvpKzybTLZ8lrRQyC6zMYpHwFTelGQQ5mbwjptby KBG221HuzlzAXqxWjSTHDUKBZeI4zDKAaWYkWB4jk/s9AXncrc5WZfF5+pFAAJL/ 4c4iOyehlt5kdVFRquwaAa51JEBEeQ/DZ9S8sHWtNMU+gFeL3Rf5bfhnh2eQxPJ2 kQpClJ5GH2jcRy0wlb3G735VcqmLFLZuRJTinasTP/zpLBOO3rfcu+nEjCzik2r3 xPSi+HB8ZmXfR7voVT09kFsYh27JLOtThdIzWab0zNCec114lMKzZ3fQJ9eXsp8W g1nIwbdTjfk0X4/5bgtfqPk+Bgg/FMd1XTJbW3Tnpi9qle0uqc3tYGBsX0J7OJGZ LLaNG5n00JC09RT38pSK9C0ZWHgFc62iEg9RuBeepf+ykkbhilnkBMGsmM2IJRZ6 9OVPO8/cBrNAxwyrmDjkI2eUa2RddEkdpy0Jl0JUIidj7gg0TtBu59lOfIFw4F07 ds00BZNcv0rrHBTtVczZW5TDggd7jhP8xMpe8GPVcGEKikKdUF096Vw1XJaz0fLD u9MmCX2LRkLr9rVpwUebbwlkR1ZT55Ats3xZsjv3dr0mLCHSfZbShB0XlxFp5DyW TPQ8GDJqoEGhyPLJlppY =JD+t -----END PGP SIGNATURE----- --Apple-Mail=_D2948073-8F92-4C0C-A584-3C9FDA7BD0E4--