Remove absolute paths from ts.
[profile.git] / .profile.d / completion.bashrc
index ae18697..0f71b59 100644 (file)
@@ -1,8 +1,10 @@
-# $Id$
+# Old bash doesn't have completion support.
+if ! builtin complete 2>&1 | grep 'not a shell builtin' >/dev/null; then
+
 # Helper!
 export COMPLETION_DIR_SSH=~/.ssh/hosts
 export COMPLETION_DIR_TELNET=~/.telnet/hosts
-export COMPLETION_DIR_RDP=~/.ssh/hosts
+export COMPLETION_DIR_RDP=~/.rdp/hosts
 export COMPLETION_DIR_PING="$COMPLETION_DIR_SSH $COMPLETION_DIR_TELNET $COMPLETION_DIR_RDP"
 
 function _generic_completion() {
@@ -131,7 +133,4 @@ complete -F _modprobe modprobe
 complete -F _rmmod rmmod
 complete -F _global global
 
-unset COMPLETION_DIR_PING
-unset COMPLETION_DIR_RDP
-unset COMPLETION_DIR_SSH
-unset COMPLETION_DIR_TELNET
+fi