# bash completion for wxmaxima(1)                -*- shell-script -*-
# Generated by wxmaxima-genopts from src/CommandLineOptions.h:
# change the options there, not here.

_wxmaxima()
{
    local cur prev words cword split
    _init_completion -s || return

    case $prev in
        -o|--open)
            _filedir '@(wxm|wxmx|zip|mac|out|xml|dem|lisp|lsp|mc)'
            return
            ;;
        -f|--ini|-m|--maxima|--screenshot|--wxmathml-lisp)
            _filedir
            return
            ;;
        --language|-u|--use-version|-l|--lisp|-X|--extra-args)
            :
            return
            ;;
    esac

    $split && return

    if [[ $cur == -* ]]; then
        COMPREPLY=( $(compgen -W '-v --version -h --help -o --open= -e --eval -d --diff --single_process --single_thread -b --batch --logtostderr --debug --pipe --exit-on-error --language= -f --ini= -u --use-version= -l --lisp= -X --extra-args= -m --maxima= --enableipc --screenshot= --wxmathml-lisp=' -- "$cur") )
        [[ ${COMPREPLY-} == *= ]] && compopt -o nospace
        return
    fi

    _filedir '@(wxm|wxmx|zip|mac|out|xml|dem|lisp|lsp|mc)'
} &&
complete -F _wxmaxima wxmaxima wxmxdiff
