From 70d2ba8d6adf9a31bcdf3b1be744bf6115cb3e81 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 9 Aug 2005 21:50:59 +0000 Subject: [PATCH] - check for interactive shell when loading bash completions Changed files: bash-completion.spec -> 1.121 --- bash-completion.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bash-completion.spec b/bash-completion.spec index f7494cf..f9f8c73 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -60,6 +60,9 @@ cat <<'EOF' > %{name}.sh # check for bash [ -z "$BASH_VERSION" ] && return +# must be interactive shell, not script +[[ $- = *i* ]] || return + # check for correct version of bash bash=${BASH_VERSION%%.*}; bmajor=${bash%%.*}; bminor=${bash#*.} if [ "$bmajor" -eq 2 -a "$bminor" '>' 04 ] || [ "$bmajor" -gt 2 ]; then -- 2.44.0