# bash completion for dvdauth                                   -*- shell-script -*-
# shellcheck shell=bash
#
# GENERATED by scripts/completions/gen.py from saramibreak/DVDAuth at 708cf70429877d44619260feafa437d65b2994a1.
# Do not edit: change the generator, then run `scripts/completions/gen.py write`.
#
# dvdauth (DVDAuth, installed with DiscImageCreator): <drive> <type> <log file>

_mediapres_dvdauth()
{
    # shellcheck disable=SC2034  # words is filled in by _init_completion
    local cur prev words cword
    _init_completion || return

    case $cword in
        1)
            local d
            COMPREPLY=()
            for d in /dev/sr[0-9]*; do
                [[ -e $d && $d == "$cur"* ]] && COMPREPLY+=("$d")
            done
            ((${#COMPREPLY[@]})) || _filedir
            ;;
        2) mapfile -t COMPREPLY < <(compgen -W 'css cppm cprm' -- "$cur") ;;
        3) _filedir ;;
    esac
} &&
    complete -F _mediapres_dvdauth dvdauth

# ex: filetype=sh
