Module: check_mk
Branch: master
Commit: 33b47d928e439db4dec3fe8f058f5063d9157ac0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=33b47d928e439d…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Sep 7 08:53:58 2017 +0200
Fixed loading of bash completion scripts.
Change-Id: Ic229e36ec9dcf39a2ae14eaf25d1858cb1213208
---
omd/packages/omd/skel/.bashrc | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/omd/packages/omd/skel/.bashrc b/omd/packages/omd/skel/.bashrc
index 84047bc..5301c5a 100644
--- a/omd/packages/omd/skel/.bashrc
+++ b/omd/packages/omd/skel/.bashrc
@@ -25,8 +25,14 @@ if [ "$PS1" ]; then
. /etc/bash_completion
# Load site specific bash completions
- for file in $OMD_ROOT/etc/bash_completion.d/*; do
- . $file;
- done
+ j="$OMD_ROOT/etc/bash_completion.d"
+ if [ -d "$j" -a -r "$j" -a -x "$j" ]; then
+ for i in $(LC_ALL=C command ls "$j"); do
+ i="$j/$i"
+ [ -f $i -a -r $i ] && . "$i"
+ done
+ unset i
+ fi
+ unset j
fi
fi