Mini Shell

Direktori : /opt/bakmgr/lib/python3.6/site-packages/bakmgr/service_cfg/
Upload File :
Current File : //opt/bakmgr/lib/python3.6/site-packages/bakmgr/service_cfg/bakmgr-autocomplete.sh

_bakmgr()
{
    local cur prev

    cur=${COMP_WORDS[COMP_CWORD]}
    prev=${COMP_WORDS[COMP_CWORD-1]}

    case ${COMP_CWORD} in
        1)
            COMPREPLY=($(compgen -W "validate restore-files restore-mysql restore-pgsql" -- ${cur}))
            ;;
        2)
            case ${prev} in
                restore-files)
                    COMPREPLY=($(compgen -A file -- ${cur}))
                    ;;
                restore-mysql)
                    COMPREPLY=($(compgen -A file -- ${cur}))
                    ;;
                restore-pgsql)
                    COMPREPLY=($(compgen -A file -- ${cur}))
                    ;;
            esac
            ;;
        *)
            COMPREPLY=()
            ;;
    esac
}

complete -F _bakmgr bakmgr

Zerion Mini Shell 1.0