From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17581 invoked by alias); 31 Dec 2015 10:30:09 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21113 Received: (qmail 20358 invoked from network); 31 Dec 2015 10:30:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 Authentication-Results: bulbizarre.swordarmor.fr; dkim=pass reason="1024-bit key" header.d=swordarmor.fr header.i=@swordarmor.fr header.b=klK+ioCY; dkim-adsp=pass; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=swordarmor.fr; h=date:from :to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=5f9Fyyc8vNN5cU3V0PB1WKXphQQ=; b=klK+ ioCYRyY4iI4oXH5lcmdmwuGmkd/ScaopAUShwKrQEwBOzQXdhceyVT+fQjDigLeB SD45OQRVAG8J/Lc5xXtrYcb/yJCNj51xGEkwfNVvzpBtKxlYMYMZos8AwqA3w2+6 8C2kQwRD1m03gq8E1AHYDgss0cwae1aTnHThkPk= DomainKey-Signature: a=rsa-sha1; c=simple; d=swordarmor.fr; h=date:from :to:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=default; b=eRekjhr5+zcV22HbolWp36K1UJgnIw SI1+kTtxUhgu1ytLmyRzD+kjg9YpuYZ386NnZpZ+GtSbIxKj1nWVvcDMzWqfhlax 1EWOOHaYgXPoIrmcltZm+03EYaJBYKpijwEdDcR2jHNqOs/3fUIVsvD3cggmZNu/ FsLe5KlzUHQn8= Date: Thu, 31 Dec 2015 11:30:03 +0100 From: Alarig Le Lay To: zsh-users@zsh.org Subject: Re: Sourcing bash completion files Message-ID: <20151231103003.GF12070@drscott.swordarmor.fr> References: <20151230232254.GC12070@drscott.swordarmor.fr> <151230173658.ZM9725@torch.brasslantern.com> <5684E4B2.8000100@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/aVve/J9H4Wl5yVO" Content-Disposition: inline In-Reply-To: <5684E4B2.8000100@gmx.com> User-Agent: Mutt/1.5.23 (2014-03-12) --/aVve/J9H4Wl5yVO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu Dec 31 03:17:54 2015, Eric Cook wrote: > On 12/30/2015 08:36 PM, Bart Schaefer wrote: > > On Dec 31, 12:22am, Alarig Le Lay wrote: > > } > > } source /usr/share/bash-completion/bash_completion > > }=20 > > } But I have an error on the source line: > > } /usr/share/bash-completion/bash_completion:35: parse error near `]]' > >=20 > > Interesting, it appears bash has adopted the ksh-style @(...) grouping > > syntax. (Chet will probably confirm or deny.) > >=20 > > Try: > >=20 > > emulate sh -o kshglob -c 'source /usr/share/bash-completion/bash_comple= tion' > >=20 > that error is due to [[ not being able to span across lines. > ignoring that, unfortunately that file has a quite a few bashism that jus= t won't work in zsh. > an incomplete list: > - printf having a -v option (saves the output to a parameter). > - relying on parameters like BASH_SOURCE, FUNCNAME > - use of the bash builtins shopt, compopt and bind > - bash's typeset -F option prints function names where as zsh's typeset = -F sets the floating point attribute It seems to not work. Regarding to your advices, I put those lines: emulate sh -o kshglob -c 'source /usr/share/bash-completion/bash_completion= ' 2>/dev/null emulate sh -o kshglob -c 'source /usr/share/bash-completion/completions/pin= g6' But when I try to complete from ping6 I have an error =E2=80=9Ccommand not found: _init_completion=E2=80=9D --=20 Alarig Le Lay --/aVve/J9H4Wl5yVO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWhQOqAAoJEK84SsFrICuIrDAH/jCR1oO8kga1k+CCdBbw7oVe SM1/rH2S9VSXW/gLHh+5ge2VdVaRUjC9DBq5Y2kyB0SCkwBFrduKZG8uzHngvvSm pbhO1xggybThUT2ZRlabqco1sEdeqP7uyT3ORl89+Wmsq3o4ObnyJlrm4d19HRbP miUFIXBkm7eEFkP8JxGGLPBsTqveU/ukg8V1yaZ5y2zrF47Vzw+Woq88F8FwuBz8 gtpNQTsqtj3LraruJ70vEwiIebPPEkMhsdbhRDXbH+/QykcSoD/wHU4fU/j/BwCY Obt5vUPBZdrBZtnKQJsXjnRbyeb1vtkayNZjg+LH+JKL0rBkLoqNIA4yWNEYGow= =4a5Y -----END PGP SIGNATURE----- --/aVve/J9H4Wl5yVO--