Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(completions/system): integrate bash-completion loader in lib/bou…
…rne-shell The search that has been in lib/bourne-shell.sh is slightly different from that in completions/system.completion.sh. We integrate the former into the latter. * We add a search location `/usr/share/bash-completion/bash_completion` for bash-completion. This is the standard location for bash-completion v2. We have been only checking /etc/bash_completion which is bash-completion v1. * We also add a guard for the POSIX mode. Older versions of bash-completion have an issue with the POSIX mode. In particular, bash-completion v1 can only be used with with the macOS Bash 3.2, but bash-completion v1 does not work well in the POSIX mode. * We also add a guard for already loaded bash-completion. Other system configuration might already load bash-completion. We skip loading bash-completion when we detect an existing bash-completion settings in tbe current shell environment.
- Loading branch information