[Bash-completion-commits] ./current r1312: initial import

Guillaume Rousse guillomovitch at zarb.org
Wed Feb 4 20:35:42 UTC 2009


------------------------------------------------------------
revno: 1312
committer: Guillaume Rousse <guillomovitch at zarb.org>
branch nick: current
timestamp: Wed 2009-02-04 21:35:42 +0100
message:
  initial import
added:
  to_review/rpmcheck
-------------- next part --------------
=== added file 'to_review/rpmcheck'
--- a/to_review/rpmcheck	1970-01-01 00:00:00 +0000
+++ b/to_review/rpmcheck	2009-02-04 20:35:42 +0000
@@ -0,0 +1,30 @@
+# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
+# ex: ts=8 sw=8 noet filetype=sh
+#
+# bash completion for rpmcheck
+
+have rpmcheck &&
+_rpmcheck()
+{
+	local cur prev
+
+	COMPREPLY=()
+	cur=`_get_cword`
+	prev=${COMP_WORDS[COMP_CWORD-1]}
+
+	case $prev in
+		-base)
+			_filedir
+			return 0
+			;;
+	esac
+
+	if [[ "$cur" == -* ]]; then
+		COMPREPLY=( $( compgen -W '-explain -failures -successes \
+			-dump -dump-all -base -help -compressed-input' \
+			-- $cur ) )
+	else
+		_filedir
+	fi
+} &&
+complete -F _rpmcheck rpmcheck $files



More information about the Bash-completion-commits mailing list