From f8771782ae6f9f227f983662eacd590181da20d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 22 May 2009 16:10:42 +0300 Subject: [PATCH] Use compgen -W instead of grepping $cur in samba hosts and domains completions. --- contrib/samba | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/samba b/contrib/samba index 27e9dcd9..a49f9dbf 100644 --- a/contrib/samba +++ b/contrib/samba @@ -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 }