SPECS: bash-completion.spec - check for interactive shell when loa...

glen glen at pld-linux.org
Tue Aug 9 23:51:04 CEST 2005


Author: glen                         Date: Tue Aug  9 21:51:04 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- check for interactive shell when loading bash completions

---- Files affected:
SPECS:
   bash-completion.spec (1.120 -> 1.121) 

---- Diffs:

================================================================
Index: SPECS/bash-completion.spec
diff -u SPECS/bash-completion.spec:1.120 SPECS/bash-completion.spec:1.121
--- SPECS/bash-completion.spec:1.120	Tue Aug  9 23:25:07 2005
+++ SPECS/bash-completion.spec	Tue Aug  9 23:50:59 2005
@@ -61,6 +61,9 @@
 # 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
@@ -100,6 +103,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.121  2005/08/09 21:50:59  glen
+- check for interactive shell when loading bash completions
+
 Revision 1.120  2005/08/09 21:25:07  charles
 - giving off /etc/bash_completion.d (can be used through e.g. openoffice.org)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/bash-completion.spec?r1=1.120&r2=1.121&f=u




More information about the pld-cvs-commit mailing list