[yum-commits] yum-utils.bash
Ville Skyttä
scop at osuosl.org
Wed Dec 8 16:18:44 UTC 2010
yum-utils.bash | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
New commits:
commit 2e85900bb63960c08e4a87151514eef5501ac013
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Wed Dec 8 18:17:42 2010 +0200
Add basic yum-builddep completion (no support for options yet).
diff --git a/yum-utils.bash b/yum-utils.bash
index eb8599d..2c5e527 100644
--- a/yum-utils.bash
+++ b/yum-utils.bash
@@ -266,6 +266,23 @@ _yu_repodiff()
} &&
complete -F _yu_repodiff repodiff repodiff.py
+# yum-builddep
+_yu_builddep()
+{
+ COMPREPLY=()
+
+ # TODO: options handling (should really come from yum completion)
+
+ if [[ $2 == -* ]] ; then
+ return 0
+ fi
+
+ COMPREPLY=( $( compgen -f -o plusdirs -X "!*.spec" -- "$2" ) )
+ [[ $2 != */* && $2 != ~* ]] && type _yum_list &>/dev/null && \
+ _yum_list all "$2"
+} &&
+complete -F _yu_builddep -o filenames yum-builddep yum-builddep.py
+
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
More information about the Yum-commits
mailing list