bash_completion errors when installed with homebrew

Heath Borders heath.borders at gmail.com
Fri Sep 28 17:02:52 CEST 2018


I installed wireguard with homebrew thusly:
```
brew install wireguard-tools
```

I'm also using brew's bash completion in my `.bash_profile` and `.bashrc`:
```
if [ -f $(brew --prefix)/etc/bash_completion ]; then
  . $(brew --prefix)/etc/bash_completion
fi
```

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
```

I've traced these errors back to the following commands using `set -x`:
```
++++ complete -o nosort -F _wg_completion wg
-bash: complete: nosort: invalid option name
++++ complete -o filenames -o nosort -F _wg_quick_completion wg-quick
-bash: complete: nosort: invalid option name
```

I'm running macOS High Sierra, which runs bash version
`3.2.57(1)-release`, which doesn't support the `nosort` option. I'd
rather not upgrade my entire terminal to bash `4.4.23(1)-release` that
wireguard installs as a dependency.

I filed an issue with homebrew as well:
https://github.com/Homebrew/homebrew-core/issues/32535

Thanks!

-Heath Borders
heath.borders at gmail.com
Twitter: heathborders
http://heath-tech.blogspot.com


More information about the WireGuard mailing list