Use compgen -W instead of grepping $cur in samba hosts and domains completions.
This commit is contained in:
parent
07c71e0aad
commit
f8771782ae
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user