commit ce4b36ee62c08f09100f830c62834accd3ef0fc7
Author: Elan Ruusamäe <[email protected]>
Date:   Sun Aug 12 21:24:02 2012 +0300

    builder-completion: parse bconds directly from .spec without builders "help"

 builder.bash-completion | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/builder.bash-completion b/builder.bash-completion
index d03896b..0b081c8 100644
--- a/builder.bash-completion
+++ b/builder.bash-completion
@@ -27,9 +27,16 @@ _builder()
                return 0
                ;;
        --with|--without)
-               local spec
+               local spec bconds
                _builder_get_spec
-               $1 -nn -ncs --show-avail-bconds $spec
+               bconds=$(
+                       awk '
+                       /^%changelog/ { exit }
+                       /^%bcond_with/{
+                               print $2
+                       }' $spec
+               )
+               COMPREPLY=( $( compgen -W "$bconds" -- "$cur" ) )
                return 0
                ;;
        esac
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to