]> git.pld-linux.org Git - packages/bash-completion.git/commitdiff
no need to separate sub for simple tag expansion
authorElan Ruusamäe <glen@delfi.ee>
Sun, 12 Aug 2012 17:32:17 +0000 (20:32 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 12 Aug 2012 17:32:17 +0000 (20:32 +0300)
builder.bash-completion

index a20c21995b23c2f91c929e7fdfa6b13274fd27c5..eb80e883851a802bbed8ef8f1c229bca12e74d07 100644 (file)
@@ -1,11 +1,4 @@
-# builder(1) completion
-
-# retrieve tags/branches from current spec
-_builder_spec_tags() {
-       local cur=$1 spec=$2 res
-       res=$(git tag)
-       COMPREPLY=( $( compgen -W "$res" -- "$cur" ) )
-}
+# PLD Linux builder(1) script completion
 
 _builder()
 {
@@ -15,7 +8,7 @@ _builder()
        case $prev in
        -r)
                local spec=*.spec
-               _builder_spec_tags $cur $spec
+               COMPREPLY=( $( compgen -W '$( git tag )' -- "$cur" ) )
                return 0
                ;;
        --with|--without)
This page took 0.07033 seconds and 4 git commands to generate.