diff --git a/commands/setup-util-bash b/commands/setup-util-bash index d4d5c957f..370c67a4a 100755 --- a/commands/setup-util-bash +++ b/commands/setup-util-bash @@ -39,6 +39,7 @@ function setup-util-bash() ( ZYPPER='bash' # no need to do fancy checks, as there is no failure if it is already present + # https://github.com/scop/bash-completion setup-util "${args[@]}" --optional --no-fallback --name='Bash Completions' \ APK='bash-completion' \ APT='bash-completion' \ diff --git a/sources/autocomplete.sh b/sources/autocomplete.sh index c8a40b171..4163bc4d3 100644 --- a/sources/autocomplete.sh +++ b/sources/autocomplete.sh @@ -46,9 +46,11 @@ if test "${AUTOCOMPLETE_BASH-}" != 'no' -a "$ACTIVE_SHELL" = 'bash'; then . '/etc/bash_completion' fi - # load homebrew completions + # load installed bash-completions if test -n "${HOMEBREW_PREFIX-}" -a -f "${HOMEBREW_PREFIX-}/etc/bash_completion"; then . "$HOMEBREW_PREFIX/etc/bash_completion" + elif test -f '/etc/profile.d/bash_completion.sh'; then + . '/etc/profile.d/bash_completion.sh' fi fi