#!/bin/bash completion for fo-configure-raid0

_fo-configure-raid0(){
    local cur prev
    local -A ARGS MAP FORCE OPTS OPTS_SUB MULTI

    COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

    OPTS=( [help]='--help -h' [sh_completion]='--sh_completion' [nolock]='--nolock' )
    ARGS=( [sh_completion]='bash|zsh' )
    MAP=( [-h]=help [--help]=help [--sh_completion]=sh_completion [--nolock]=nolock )

    if [ ! -z "$prev" ]; then
        # if is an argument complete with list of choice if define
        prev_key=${MAP[$prev]}
        if [ ! -z "$prev_key" ] && [ -v "${ARGS[$prev_key]}" ]; then
            COMPREPLY=($(compgen -W "${ARGS[$prev_key]}" -- "${cur}"))
            return 0
        fi
    fi
    for in_use in ${COMP_WORDS[@]:1}; do
        key=${MAP[$in_use]}
        # Unset option that is already use
          unset OPTS[$key]
          unset ARGS[$key]
    done
    compl="${OPTS[@]}"
    COMPREPLY=($(compgen -W "${compl}" -- "${cur}"))
    return 0
}

complete -F _fo-configure-raid0 fo-configure-raid0
#!/bin/bash completion for fo-configure-raid0

_fo-configure-raid0(){
    local cur prev
    local -A ARGS MAP FORCE OPTS OPTS_SUB MULTI

    COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

    OPTS=( [help]='--help -h' [sh_completion]='--sh_completion' [nolock]='--nolock' )
    ARGS=( [sh_completion]='bash|zsh' )
    MAP=( [-h]=help [--help]=help [--sh_completion]=sh_completion [--nolock]=nolock )

    if [ ! -z "$prev" ]; then
        # if is an argument complete with list of choice if define
        prev_key=${MAP[$prev]}
        if [ ! -z "$prev_key" ] && [ -v "${ARGS[$prev_key]}" ]; then
            COMPREPLY=($(compgen -W "${ARGS[$prev_key]}" -- "${cur}"))
            return 0
        fi
    fi
    for in_use in ${COMP_WORDS[@]:1}; do
        key=${MAP[$in_use]}
        # Unset option that is already use
          unset OPTS[$key]
          unset ARGS[$key]
    done
    compl="${OPTS[@]}"
    COMPREPLY=($(compgen -W "${compl}" -- "${cur}"))
    return 0
}

complete -F _fo-configure-raid0 fo-configure-raid0
#!/bin/bash completion for fo-configure-raid0

_fo-configure-raid0(){
    local cur prev
    local -A ARGS MAP FORCE OPTS OPTS_SUB MULTI

    COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

    OPTS=( [help]='--help -h' [sh_completion]='--sh_completion' [nolock]='--nolock' )
    ARGS=( [sh_completion]='bash|zsh' )
    MAP=( [-h]=help [--help]=help [--sh_completion]=sh_completion [--nolock]=nolock )

    if [ ! -z "$prev" ]; then
        # if is an argument complete with list of choice if define
        prev_key=${MAP[$prev]}
        if [ ! -z "$prev_key" ] && [ -v "${ARGS[$prev_key]}" ]; then
            COMPREPLY=($(compgen -W "${ARGS[$prev_key]}" -- "${cur}"))
            return 0
        fi
    fi
    for in_use in ${COMP_WORDS[@]:1}; do
        key=${MAP[$in_use]}
        # Unset option that is already use
          unset OPTS[$key]
          unset ARGS[$key]
    done
    compl="${OPTS[@]}"
    COMPREPLY=($(compgen -W "${compl}" -- "${cur}"))
    return 0
}

complete -F _fo-configure-raid0 fo-configure-raid0
#!/bin/bash completion for fo-configure-raid0

_fo-configure-raid0(){
    local cur prev
    local -A ARGS MAP FORCE OPTS OPTS_SUB MULTI

    COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

    OPTS=( [help]='--help -h' [sh_completion]='--sh_completion' [nolock]='--nolock' )
    ARGS=( [sh_completion]='bash|zsh' )
    MAP=( [-h]=help [--help]=help [--sh_completion]=sh_completion [--nolock]=nolock )

    if [ ! -z "$prev" ]; then
        # if is an argument complete with list of choice if define
        prev_key=${MAP[$prev]}
        if [ ! -z "$prev_key" ] && [ -v "${ARGS[$prev_key]}" ]; then
            COMPREPLY=($(compgen -W "${ARGS[$prev_key]}" -- "${cur}"))
            return 0
        fi
    fi
    for in_use in ${COMP_WORDS[@]:1}; do
        key=${MAP[$in_use]}
        # Unset option that is already use
          unset OPTS[$key]
          unset ARGS[$key]
    done
    compl="${OPTS[@]}"
    COMPREPLY=($(compgen -W "${compl}" -- "${cur}"))
    return 0
}

complete -F _fo-configure-raid0 fo-configure-raid0
