Switch to Bash built-in 'test' command.
--- a/.bashrc Mon Jan 02 18:34:55 2012 +0200
+++ b/.bashrc Mon Jan 02 18:38:59 2012 +0200
@@ -132,19 +132,19 @@
# Completion.
# Use system wide completion, if available.
-if [ -f /etc/bash_completion ]; then
+if [[ -f /etc/bash_completion ]]; then
# Under Cygwin bash completition take a long time for starting.
- if [ ! "$OSTYPE" = cygwin ]; then
+ if [[ ! $OSTYPE = cygwin ]]; then
. /etc/bash_completion
fi
-elif [ -f $HOME/usr/etc/bash_completion ]; then
- . $HOME/usr/etc/bash_completion
+elif [[ -f ~/usr/etc/bash_completion ]]; then
+ . ~/usr/etc/bash_completion
fi
# Load local completions.
-if [ -f ~/.bash_completion ]; then
+if [[ -f ~/.bash_completion ]]; then
. ~/.bash_completion
fi
-if [ -d ~/.bash_completion.d ]; then
+if [[ -d ~/.bash_completion.d ]]; then
for f in ~/.bash_completion.d/* ~/.bash_completion.d/.*; do
. $f
done