Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Ishan Goel 2020-07-21 12:49:00 +04:00 committed by GitHub
parent f7580f109e
commit c94196c073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,12 +23,9 @@ if type brew &>/dev/null; then
fi fi
``` ```
Should you later install the `bash-completion` formula, this will automatically use its initialization script to read the completions files. If you install the `bash-completion` formula, this will automatically source the completions' initialisation script (so you do not need to follow the instructions in the caveats).
When installed, the `bash-completion` formula also runs `${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh` and all files in the `bash_completion.d` directory. This is done by adding a line to your `.bash_profile` which is given in the Caveats section upon the installation of `bash-completion`
As both Homebrew's completion code given above and the Caveats line do the same thing, it is recommended to either not add the Caveats line or to comment the line out because Homebrew's completion code works even without installing the `bash-completion` formula. If you are using the `bash` formula as your shell (i.e. `bash` >= v4) you should use the `bash-completion@2` formula instead.
If you are using a version of `bash` newer than version 4.1 (like Homebrew's `bash`), we recommended you use the `bash-completion@2` formula instead because it is newer and has better performance. You can check the version of `bash` you have by running `bash --version`. MacOS ships with version 3.2.
## Configuring Completions in `zsh` ## Configuring Completions in `zsh`