[Bash-completion-commits] [SCM] bash-completion branch, master, updated. e96ef90c262e982b66b1d1bbe7a9bda7674a1f4e
Ville Skyttä
ville.skytta at iki.fi
Fri May 22 13:29:22 UTC 2009
The following commit has been merged in the master branch:
commit f8771782ae6f9f227f983662eacd590181da20d4
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Fri May 22 16:10:42 2009 +0300
Use compgen -W instead of grepping $cur in samba hosts and domains completions.
diff --git a/contrib/samba b/contrib/samba
index 27e9dcd..a49f9db 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
}
--
bash-completion
More information about the Bash-completion-commits
mailing list