summaryrefslogtreecommitdiffstats
path: root/completions/rrdtool
blob: 8f8568751b1367611194f94d1a02ff930106ae7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# bash completion for rrdtool                              -*- shell-script -*-

_comp_cmd_rrdtool()
{
    local cur prev words cword comp_args
    _comp_initialize -- "$@" || return

    if ((${#words[@]} == 2)); then
        _comp_compgen -- -W 'create update updatev graph dump restore last
            lastupdate first info fetch tune resize xport'
    else
        _comp_compgen_filedir rrd
    fi
} &&
    complete -F _comp_cmd_rrdtool rrdtool

# ex: filetype=sh