Use compgen -W instead of grepping $cur in samba hosts and domains completions.

This commit is contained in:
Ville Skyttä 2009-05-22 16:10:42 +03:00
parent 07c71e0aad
commit f8771782ae

View File

@ -12,14 +12,14 @@ _samba_resolve_order()
_samba_domains()
{
if [ -n "${COMP_SAMBA_SCAN:-}" ]; then
COMPREPLY=( $( smbtree -D | grep "^$cur" ) )
COMPREPLY=( $( compgen -W '$( smbtree -D )' -- $cur ) )
fi
}
_samba_hosts()
{
if [ -n "${COMP_SAMBA_SCAN:-}" ]; then
COMPREPLY=( $( smbtree -S | grep "^$cur" ) )
COMPREPLY=( $( compgen -W "$( smbtree -S )" -- $cur ) )
fi
}