PageRenderTime 137ms CodeModel.GetById 129ms app.highlight 1ms RepoModel.GetById 4ms app.codeStats 0ms

/bash_completion.d/mysqladmin

http://github.com/brinkman83/bashrc
#! | 38 lines | 32 code | 6 blank | 0 comment | 0 complexity | 040e9a13afd010fd576da4082a439a10 MD5 | raw file
 1# bash completion for mysqladmin
 2
 3have mysqladmin &&
 4_mysqladmin()
 5{
 6    local cur prev
 7
 8    COMPREPLY=()
 9    cur=`_get_cword`
10    prev=${COMP_WORDS[COMP_CWORD-1]}
11
12    case "$prev" in
13    -u)
14        COMPREPLY=( $( compgen -u -- "$cur" ) )
15        return 0
16        ;;
17    *)
18        ;;
19    esac
20
21    COMPREPLY=( $( compgen -W '-# -f -? -C -h -p -P -i -r -E -s -S -t -u \
22        -v -V -w' -- "$cur" ) )
23
24    COMPREPLY=( "${COMPREPLY[@]}" \
25        $( compgen -W 'create drop extended-status flush-hosts flush-logs \
26        flush-status flush-tables flush-threads flush-privileges kill \
27        password ping processlist reload refresh shutdown status variables \
28        version' -- "$cur" ) )
29} &&
30complete -F _mysqladmin mysqladmin
31
32# Local variables:
33# mode: shell-script
34# sh-basic-offset: 4
35# sh-indent-comment: t
36# indent-tabs-mode: nil
37# End:
38# ex: ts=4 sw=4 et filetype=sh