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.
22 lines
548 B
22 lines
548 B
3 years ago
|
#!/usr/bin/env bash
|
||
|
# bash completion for web-greeter
|
||
|
|
||
|
_web-greeter() {
|
||
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||
|
local last="${COMP_WORDS[COMP_CWORD - 1]}"
|
||
|
local xpat='!*.jpg'
|
||
|
local options='--debug --normal --list --theme --help -h --version -v'
|
||
|
|
||
|
case "${last}" in
|
||
|
--theme)
|
||
|
_filedir
|
||
|
options=$(ls -1d /usr/share/web-greeter/themes/*/ | cut -c 1- |
|
||
|
rev | cut -c 2- | rev | sort | sed 's/\/usr\/share\/web-greeter\/themes\///')
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
COMPREPLY+=( $(compgen -W "${options}" -- "${cur}") )
|
||
|
}
|
||
|
|
||
|
complete -F _web-greeter web-greeter
|