summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-08-31 20:53:13 +0200
committerMichał Górny <mgorny@gentoo.org>2014-08-31 20:54:12 +0200
commit1d1cb2687fc7d60411eb9c91404f1714349a202e (patch)
treeb83e575936022d52af1dcb5fb1e52ec19b891e31 /completions/repoman
parentMakefile: remove the outdated install target temporarily. (diff)
downloadgentoo-bashcomp-1d1cb2687fc7d60411eb9c91404f1714349a202e.tar.gz
gentoo-bashcomp-1d1cb2687fc7d60411eb9c91404f1714349a202e.tar.bz2
gentoo-bashcomp-1d1cb2687fc7d60411eb9c91404f1714349a202e.zip
Move completions into subdirectories.
completions/ for files going to completionsdir, compat/ for those going into compatdir.
Diffstat (limited to 'completions/repoman')
-rw-r--r--completions/repoman65
1 files changed, 65 insertions, 0 deletions
diff --git a/completions/repoman b/completions/repoman
new file mode 100644
index 0000000..b9dac93
--- /dev/null
+++ b/completions/repoman
@@ -0,0 +1,65 @@
+# Gentoo Linux Repoman Command Completion
+#
+# $Id$
+#
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+# repoman completion by Jeremy Olexa <darkside@gentoo.org>
+# rewrite by Ryan Hill <dirtyepic@gentoo.org>
+
+_repoman()
+{
+ local cur prev opts modes split=false
+
+ COMPREPLY=()
+ opts="$(_parse_help ${COMP_WORDS[0]}) --commitmsg --commitmsgfile"
+ modes="ci commit fix full help manifest manifest-check scan"
+
+ _get_comp_words_by_ref -n = cur prev
+ _split_longopt && split=true
+
+ case $prev in
+ -h|--help|help|-m|--commitmsg|-V|--version)
+ return 0
+ ;;
+ --commitmsgfile)
+ _filedir
+ return 0
+ ;;
+ --digest|--if-modified)
+ COMPREPLY=( $(compgen -W 'y n' -- "$cur") )
+ return 0
+ ;;
+ --echangelog)
+ COMPREPLY=( $(compgen -W 'y n force' -- "$cur") )
+ return 0
+ ;;
+ --mode)
+ COMPREPLY=( $(compgen -W "${modes}" -- "$cur") )
+ return 0
+ ;;
+ --vcs)
+ COMPREPLY=( $(compgen -W 'cvs svn git bzr hg' -- "$cur") )
+ return 0
+ ;;
+ esac
+
+ $split && return 0
+
+ case $cur in
+ -*)
+ COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
+ return 0
+ ;;
+ *)
+ COMPREPLY=( $(compgen -W "$modes" -- "$cur") )
+ return 0
+ ;;
+ esac
+
+ return 0
+} &&
+complete -F _repoman repoman
+
+# vim: ft=sh:et:ts=4:sw=4:tw=80