summaryrefslogtreecommitdiffstats
path: root/completions/dumpe2fs
blob: 326564e833b779b3b251f5927a3ca028e19d6e8a (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
# dumpe2fs(8) completion                                   -*- shell-script -*-

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

    case $prev in
        -*[oV])
            return
            ;;
        -*i)
            _comp_compgen_filedir
            return
            ;;
    esac

    if [[ $cur == -* ]]; then
        _comp_compgen_usage
        return
    fi

    _comp_compgen -c "${cur:-/dev/}" filedir
} &&
    complete -F _comp_cmd_dumpe2fs dumpe2fs

# ex: filetype=sh