summaryrefslogtreecommitdiff
path: root/contrib/mysqladmin
blob: 0a84de1ed635931c658edb2f3ada1a128f916335 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# bash completion for mysqladmin

have mysqladmin &&
_mysqladmin()
{
    local cur prev

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

    case "$prev" in
    -u)
        COMPREPLY=( $( compgen -u -- "$cur" ) )
        return 0
        ;;
    *)
        ;;
    esac

    COMPREPLY=( $( compgen -W '-# -f -? -C -h -p -P -i -r -E -s -S -t -u \
        -v -V -w' -- "$cur" ) )

    COMPREPLY=( "${COMPREPLY[@]}" \
        $( compgen -W 'create drop extended-status flush-hosts flush-logs \
        flush-status flush-tables flush-threads flush-privileges kill \
        password ping processlist reload refresh shutdown status variables \
        version' -- "$cur" ) )
} &&
complete -F _mysqladmin mysqladmin

# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh