Cleanup completion variables.
[profile.git] / .profile.d / completion.bashrc
index cf77c15..fa86e5e 100644 (file)
@@ -30,8 +30,7 @@ function _process() {
 function _known_hosts() {
   cur=${COMP_WORDS[COMP_CWORD]}
 
-  HOSTS=$(sed 's/[      ].*//;s/,/\
-/' ~/.ssh/known_hosts)
+  HOSTS=$(sed 's/[      ].*//;s/,/\n/' ~/.ssh/known_hosts)
 
   COMPREPLY=($(compgen -W "$HOSTS" -- "$cur"))
   return 0
@@ -86,7 +85,7 @@ function _modprobe() {
   COMPREPLY=()
   cur=${COMP_WORDS[COMP_CWORD]}
 
-  ver=$(uname -r)
+  ver=$KERNEL
   MODULES="$(find /lib/modules/$ver -name \*.ko | sed -n 's@^.*/\([^/]*\).ko$@\1@p')"
 
   COMPREPLY=($(compgen -W "$MODULES" -- "$cur"))
@@ -121,3 +120,8 @@ complete -F _known_hosts kill_known_host
 complete -F _known_hosts knh
 complete -F _modprobe modprobe
 complete -F _rmmod rmmod
+
+unset COMPLETION_DIR_PING
+unset COMPLETION_DIR_RDP
+unset COMPLETION_DIR_SSH
+unset COMPLETION_DIR_TELNET