~ubuntu-branches/ubuntu/vivid/lightdm/vivid

« back to all changes in this revision

Viewing changes to data/bash-completion/dm-tool

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2015-03-10 14:54:29 UTC
  • Revision ID: package-import@ubuntu.com-20150310145429-jh3ntjg2uu588y5v
Tags: 1.13.2-0ubuntu1
* New upstream release:
  - Fix pipe file descriptor leak for each greeter session. (LP: #1190344)
  - Support active session changing via logind. (LP: #1371378)
  - Don't allow liblightdm-gobject to be disabled. It is required for
    liblightdm-qt and the tests so it's not worth supporting builds without
    it.
  - Add bash autocompletion support
* debian/lightdm.install:
  - Install autocompletion configuration

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#-*- mode: shell-script;-*-
 
2
 
 
3
_dm_tool()
 
4
{
 
5
    local cur prev opts
 
6
    _init_completion || return
 
7
    opts='switch-to-greeter switch-to-user switch-to-guest lock list-seats add-nested-seat add-local-x-seat add-seat'
 
8
 
 
9
    case "$prev" in
 
10
    switch-to-greeter)
 
11
        return 0
 
12
        ;;
 
13
    switch-to-user)
 
14
        COMPREPLY=($(compgen -u -- "${cur}"))
 
15
        return 0
 
16
        ;;
 
17
    switch-to-guest)
 
18
        # FIXME: session name
 
19
        return 0
 
20
        ;;
 
21
    lock)
 
22
        return 0
 
23
        ;;
 
24
    list-seats)
 
25
        return 0
 
26
        ;;
 
27
    add-nested-seat)
 
28
        # FIXME ...
 
29
        return 0
 
30
        ;;
 
31
    add-local-x-seat)
 
32
        # FIXME ...
 
33
        return 0
 
34
        ;;
 
35
    add-seat)
 
36
        # FIXME ...
 
37
        return 0
 
38
        ;;
 
39
    *)
 
40
        ;;
 
41
    esac
 
42
 
 
43
    if [[ "$cur" == -* ]]; then
 
44
        COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
 
45
        return 0
 
46
    fi
 
47
 
 
48
    COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
 
49
    return 0
 
50
}
 
51
complete -F _dm_tool dm-tool