[packages/bash-completion] complete *.spec if not an arg
glen
glen at pld-linux.org
Sun Aug 12 18:57:01 CEST 2012
commit 8a71a198be6f6b13fa17e0743c6b2394d30e0715
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Aug 12 19:56:58 2012 +0300
complete *.spec if not an arg
builder.bash-completion | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
---
diff --git a/builder.bash-completion b/builder.bash-completion
index 127a216..8f08167 100644
--- a/builder.bash-completion
+++ b/builder.bash-completion
@@ -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
More information about the pld-cvs-commit
mailing list