Author: glen                         Date: Tue Feb  8 09:27:05 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- complete braches

---- Files affected:
packages/bash-completion:
   builder.bash-completion (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/bash-completion/builder.bash-completion
diff -u packages/bash-completion/builder.bash-completion:1.2 
packages/bash-completion/builder.bash-completion:1.3
--- packages/bash-completion/builder.bash-completion:1.2        Tue Oct 19 
21:56:30 2010
+++ packages/bash-completion/builder.bash-completion    Tue Feb  8 10:27:00 2011
@@ -1,5 +1,12 @@
 # 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}')
+       COMPREPLY=( $( compgen -W "$res" -- "$cur" ) )
+}
+
 _builder()
 {
        local cur prev first
@@ -11,6 +18,11 @@
        case "$prev" in
                -@(g|--get))
                        _filedir
+                       return 0
+                       ;;
+               -r)
+                       local spec=*.spec
+                       _builder_spec_branches "$cur" "$spec"
                        return 0
                        ;;
                --with|--without)
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/bash-completion/builder.bash-completion?r1=1.2&r2=1.3&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to