File: dm-tool

package info (click to toggle)
lightdm 1.32.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,016 kB
  • sloc: ansic: 24,716; sh: 5,008; makefile: 1,159; cpp: 1,143; python: 267; xml: 39
file content (51 lines) | stat: -rw-r--r-- 996 bytes parent folder | download | duplicates (6)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
#-*- mode: shell-script;-*-

_dm_tool()
{
    local cur prev opts
    _init_completion || return
    opts='switch-to-greeter switch-to-user switch-to-guest lock list-seats add-nested-seat add-local-x-seat add-seat'

    case "$prev" in
    switch-to-greeter)
        return 0
        ;;
    switch-to-user)
        COMPREPLY=($(compgen -u -- "${cur}"))
        return 0
        ;;
    switch-to-guest)
        # FIXME: session name
        return 0
        ;;
    lock)
        return 0
        ;;
    list-seats)
        return 0
        ;;
    add-nested-seat)
        # FIXME ...
        return 0
        ;;
    add-local-x-seat)
        # FIXME ...
        return 0
        ;;
    add-seat)
        # FIXME ...
        return 0
        ;;
    *)
        ;;
    esac

    if [[ "$cur" == -* ]]; then
        COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
        return 0
    fi

    COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
    return 0
}
complete -F _dm_tool dm-tool