# bash completion for CreoleGet and CreoleSet
# Christophe DEZE Académie DE Nantes
#
_CreoleGet()
{
    local cur prev words cword
    _init_completion || return

    COMPREPLY=()
    if [ $COMP_CWORD -eq 1 ]; then
        local creolevars=$(CreoleGet --list | awk -F'=' "/^$cur/ {print \$1}")
        COMPREPLY=( $(compgen -W "${creolevars}" -- ${cur}) )
    fi
}

complete -F _CreoleGet CreoleGet CreoleSet
