Fix contrib/ssh command completion

Only complete with command names (compgen -c) if argc > 1
This commit is contained in:
Freddy Vulto 2009-06-17 23:45:00 +02:00
parent 043fe4dd4b
commit cdf0e82686

View File

@ -95,7 +95,9 @@ _ssh()
shift
done
_known_hosts_real -a "$optconfigfile" -h "$cur"
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -c -- $cur ) )
if [ $COMP_CWORD -ne 1 ]; then
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -c -- $cur ) )
fi
fi
return 0