about summary refs log tree commit diff
path: root/Completion/openSUSE/Command/_SUSEconfig
blob: d50828529557a9e385cf490ff61d426b2d50a0ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#compdef SuSEconfig

local curcontext="$curcontext" state line
typeset -A opt_args

if [[ -z "$_SuSEconfig_modules" ]]; then 
	for i in /sbin/conf.d/SuSEconfig.*; do
		case $i in *.rpm*|*.swap|*.bak|*.orig|*~|\#*) continue;; esac
		_SuSEconfig_modules=($_SuSEconfig_modules ${i##*/SuSEconfig.})
	done
fi


_arguments \
  '--help' \
  '--quick' \
  '--force' \
  '--verbose' \
  '--nonewpackage' \
  '--module:module:->module' && return 0

case $state in
	module) compadd $_SuSEconfig_modules ;;
esac

# Usage: SuSEconfig [--quick|--nonewpackage|--force|--verbose] [--module name]