[Bash-completion-commits] [SCM] bash-completion branch, master, updated. e96ef90c262e982b66b1d1bbe7a9bda7674a1f4e

Ville Skyttä ville.skytta at iki.fi
Fri May 22 13:29:23 UTC 2009


The following commit has been merged in the master branch:
commit 853492744384d4b6a37bc5d67456414c349167e3
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri May 22 16:16:49 2009 +0300

    Prune domains and host descriptions from samba hosts completion.

diff --git a/contrib/samba b/contrib/samba
index ef5def3..0d524b9 100644
--- a/contrib/samba
+++ b/contrib/samba
@@ -19,7 +19,9 @@ _samba_domains()
 _samba_hosts()
 {
 	if [ -n "${COMP_SAMBA_SCAN:-}" ]; then
-		COMPREPLY=( $( compgen -W "$( smbtree -N -S )" -- $cur ) )
+		COMPREPLY=( $( compgen -W "$( smbtree -N -S | \
+			sed -ne 's/^[[:space:]]*\\\\*\([^[:space:]]*\).*/\1/p' \
+			)" -- $cur ) )
 	fi
 }
 

-- 
bash-completion



More information about the Bash-completion-commits mailing list