# This bash script adds tab-completion feature to softwarecollections command.
# It is only available for root, because other users can not see the secret key.

if [ $(id -u) -eq 0 ]; then

    _django_completion()
    {
        COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
                       COMP_CWORD=$COMP_CWORD \
                       DJANGO_AUTO_COMPLETE=1 $1 ) )
    }
    complete -F _django_completion -o default softwarecollections

fi

