--- bash_completion.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: bash-completion-2.11/bash_completion.sh.in =================================================================== --- bash-completion-2.11.orig/bash_completion.sh.in +++ bash-completion-2.11/bash_completion.sh.in @@ -1,6 +1,6 @@ # shellcheck shell=sh disable=SC1091,SC2039,SC2166 # Check for interactive bash and that we haven't already been sourced. -if [ "x${BASH_VERSION-}" != x -a "x${PS1-}" != x -a "x${BASH_COMPLETION_VERSINFO-}" = x ]; then +if [[ -n "${BASH_VERSION-}" && $- = *i* && -z "${BASH_COMPLETION_VERSINFO-}" ]]; then # Check for recent enough version of bash. if [ "${BASH_VERSINFO[0]}" -gt 4 ] ||