wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: Bernhard Ehlers <wg@bernhard-ehlers.de>
To: wireguard@lists.zx2c4.com
Subject: Re: bash_completion errors when installed with homebrew
Date: Tue, 2 Oct 2018 11:46:38 +0200	[thread overview]
Message-ID: <2A7E108A-8FAC-485A-A17F-1895AB3D3DCF@bernhard-ehlers.de> (raw)
In-Reply-To: <CAEy7hVPn++92XRedQg2OSwK0OAoqds6b15U2iHjePrWie1qrKw@mail.gmail.com>

> After installing wireguard, when I open a new terminal, I see the
> following errors:
> ```
> -bash: complete: nosort: invalid option name
> -bash: complete: nosort: invalid option name
> ```

Almost all systems are using bash v4, Mac OS X is one of the few systems that
still use bash v3. Of course it’s possible to rewrite the completion scripts for v3
compatiblility, but I’m not sure if the devs are enthusiastic about that. Changes
to the completion scripts effect all systems.

In another post I suggested to change the wg-quick for OS X to support bash v3,
but that change won’t affect other systems.

My suggestion is, that the completion scripts do nothing for bash versions lower
than 4. Then this error messages won’t show up, but (of course) the completion
won’t work.

So something like this at the beginning of the completion scripts:

[[ ${BASH_VERSINFO[0]} -ge 4 ]] || return 0
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

      reply	other threads:[~2018-10-02  9:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28 15:02 bash_completion errors when installed with homebrew Heath Borders
2018-10-02  9:46 ` Bernhard Ehlers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2A7E108A-8FAC-485A-A17F-1895AB3D3DCF@bernhard-ehlers.de \
    --to=wg@bernhard-ehlers.de \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).