You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#compdef web-greeter
|
|
|
|
|
|
|
|
_webgreeter() {
|
|
|
|
integer ret=1
|
|
|
|
local -a args
|
|
|
|
local themes=$(ls -1d /usr/share/web-greeter/themes/*/ | cut -c 1- |
|
|
|
|
rev | cut -c 2- | rev | sort | sed 's/\/usr\/share\/web-greeter\/themes\///')
|
|
|
|
args+=(
|
|
|
|
"(-d -n --debug --normal)--mode[Set browser mode]:mode:->modes"
|
|
|
|
"(--debug -d --normal -n --mode)"{--debug,-d}"[Runs the greeter in debug mode]"
|
|
|
|
"(--normal -n --debug -d --mode)"{--normal,-n}"[Runs in non-debug mode]"
|
|
|
|
'--list[Lists available themes]'
|
|
|
|
"--theme[Sets the theme to use]:theme:->themes"
|
|
|
|
"(--help -h)"{--help,-h}"[Show help]"
|
|
|
|
"(--version -v)"{--version,-v}"[Print program version]"
|
|
|
|
"--api-version[Print JavaScript API version number]"
|
|
|
|
)
|
|
|
|
_arguments $args[@] && ret=0
|
|
|
|
case "$state" in
|
|
|
|
themes)
|
|
|
|
_files
|
|
|
|
_values 'themes' "${(uonzf)${themes}}"
|
|
|
|
;;
|
|
|
|
modes)
|
|
|
|
_values 'modes' "debug" "normal"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
_webgreeter
|