]> git.pld-linux.org Git - packages/bash-completion.git/commitdiff
- check for interactive shell when loading bash completions
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 9 Aug 2005 21:50:59 +0000 (21:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bash-completion.spec -> 1.121

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.031912 seconds and 4 git commands to generate.