]> git.pld-linux.org Git - packages/bash-completion.git/commitdiff
complete *.spec if not an arg
authorElan Ruusamäe <glen@delfi.ee>
Sun, 12 Aug 2012 16:56:58 +0000 (19:56 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 12 Aug 2012 16:56:58 +0000 (19:56 +0300)
builder.bash-completion

index 127a21691c80df12c9aaf15a2b45ad4272079154..8f081675c400c51aa61000d516272918aaf53398 100644 (file)
@@ -40,15 +40,7 @@ _builder()
                        --with --without
                ' -- $cur ) )
        else
-               # find which specfile to use
-               specfile=
-               for (( i=1; i < COMP_CWORD; i++ )); do
-                       if [[ "${COMP_WORDS[i]}" == -@(?(build)file|f) ]]; then
-                               specfile=${COMP_WORDS[i+1]}
-                               break
-                       fi
-               done
-               [ ! -f $specfile ] && return 0
+               _filedir spec
        fi
 
        return 0
This page took 0.072483 seconds and 4 git commands to generate.