summaryrefslogtreecommitdiffstats
path: root/completions/xev
blob: 78df177ac05fb698a082b19b6d4d1595363b14ab (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
# xev(1) completion                                        -*- shell-script -*-

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

    case $prev in
        -display | -geometry | -bw | -id | -name)
            return
            ;;
        -bs)
            _comp_compgen -- -W 'NotUseful WhenMapped Always'
            return
            ;;
        -event)
            _comp_compgen -- -W 'keyboard mouse expose visibility structure
                substructure focus property colormap owner_grab_button randr
                button'
            return
            ;;
    esac

    if [[ $cur == -* ]]; then
        _comp_compgen_help
        return
    fi
} &&
    complete -F _comp_cmd_xev xev

# ex: filetype=sh