Bash-completion supports pre-defining $BASH_COMPLETION as the path to the main script, so use that if it's defined.
Alsö, don't load homebrew's completion if we've successfully loaded one already.
Instead of using the profile.d version, just invoke the script. The profile.d script preemptively short-circuits if it thinks that bash-completions has already been loaded, which it does by using the $BASH_COMPLETION variable, which is expressly supported by upstream to specify the location of the script...so it will entirely be never loaded if this is set.
- General cleanup of system completion
- Use homebrew's completion loading script instead
- Deprecate completions covered by system
- Adjust load priority of brew to happen after system
In addition to the regular /etc/bash_completion, the one from Homebrew
is loaded when running on OS X, and when Homebrew is installed.
Also added the system completion to the default install options, since
this is a feature that's requested frequently.