shithub: choc

ref: ad37a8ff334476f57a1d0ea55b5022bca5010fe8
dir: /man/bash-completion/doom.template/

View raw version
# bash completion for Chocolate Doom                       -*- shell-script -*-

_chocolate_doom()
{
    local cur prev words cword
    _init_completion || return

    case $prev in
        -config|-extraconfig)
            _filedir cfg
            ;;
        -file|-iwad|-aa|-af|-as|-merge|-nwtmerge)
            _filedir wad
            ;;
        -pack)
            COMPREPLY=(doom2 tnt plutonia)
            ;;
        -gameversion)
            COMPREPLY=(1.9 ultimate final final2 hacx chex)
            ;;
        -setmen)
            COMPREPLY=(dos622 dos71 dosbox)
            ;;
        -playdemo|-timedemo)
            _filedir lmp
            ;;
        -deh)
            _filedir bex deh
            ;;
    esac

    if [[ $cur == -* ]]; then
        COMPREPLY=( $( compgen -W '@content' -- "$cur" ) )
    fi
} &&

complete -F _chocolate_doom chocolate-doom

# ex: ts=4 sw=4 et filetype=sh