Fix issue with empty/non-exist directory.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 28 Sep 2011 18:21:39 +0300
changeset 220 987a83ddd689
parent 219 35ff28da5c85
child 221 aa682f0b1e7b
Fix issue with empty/non-exist directory.
.bash_completion
--- a/.bash_completion	Wed Sep 28 15:39:38 2011 +0300
+++ b/.bash_completion	Wed Sep 28 18:21:39 2011 +0300
@@ -1,7 +1,9 @@
 
-for f in ~/.bash_completion.d/*; do
-  . $f
-done
+if [[ -s ~/.bash_completion.d ]]; then
+  for f in ~/.bash_completion.d/* ~/.bash_completion.d/.*; do
+    . $f
+  done
+fi
 
 # Local variables:
 # mode: shell-script