]> git.pld-linux.org Git - packages/bash-completion.git/commitdiff
builder-completion: parse bconds directly from .spec without builders "help"
authorElan Ruusamäe <glen@delfi.ee>
Sun, 12 Aug 2012 18:24:02 +0000 (21:24 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 12 Aug 2012 18:24:02 +0000 (21:24 +0300)
builder.bash-completion

index d03896b8d5bf933aaf44f5d457c83a1e6ed6cd21..0b081c8d960d8741494c83103cfbbf196c64b3c0 100644 (file)
@@ -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
This page took 0.031061 seconds and 4 git commands to generate.