[packages/bash-completion] fetch tags from git

glen glen at pld-linux.org
Sun Aug 12 18:53:28 CEST 2012


commit bb7982d33a43b8db40e112edb58e24e5ef5d2c67
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Aug 12 19:53:25 2012 +0300

    fetch tags from git

 builder.bash-completion | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/builder.bash-completion b/builder.bash-completion
index 7c78a5d..127a216 100644
--- a/builder.bash-completion
+++ b/builder.bash-completion
@@ -1,9 +1,9 @@
 # builder(1) completion
 
-# retrieve branches from current spec
-_builder_spec_branches() {
-	local cur="$1" spec="$2" res
-	res=$(cvs status -v "$spec" | awk 'NF==3 && /branch:/{print $1}')
+# retrieve tags/branches from current spec
+_builder_spec_tags() {
+	local cur=$1 spec=$2 res
+	res=$(git tag)
 	COMPREPLY=( $( compgen -W "$res" -- "$cur" ) )
 }
 
@@ -22,7 +22,7 @@ _builder()
 			;;
 		-r)
 			local spec=*.spec
-			_builder_spec_branches "$cur" "$spec"
+			_builder_spec_tags "$cur" "$spec"
 			return 0
 			;;
 		--with|--without)
@@ -53,4 +53,4 @@ _builder()
 
 	return 0
 }
-#complete -F _builder builder
+complete -F _builder builder


More information about the pld-cvs-commit mailing list