]> git.pld-linux.org Git - packages/bash-completion.git/blobdiff - bash-completion.spec
- check for interactive shell when loading bash completions
[packages/bash-completion.git] / bash-completion.spec
index f7494cf6a782d46a10297e45d8a52c06a99bf779..f9f8c73c50a50e7022936ab2ec8f4f133735e8cd 100644 (file)
@@ -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
This page took 0.101539 seconds and 4 git commands to generate.