Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
192 - 1
# bash completion for lldpad
2
#
3
## lldpad --help
4
# usage: lldpad [-hdksv] [-f configfile]
5
# options:
6
#   -h  show this usage
7
#   -f  use configfile instead of default
8
#   -d  run daemon in the background
9
#   -k  terminate current running lldpad
10
#   -s  remove lldpad state records
11
#   -v  show version
12
#   -V  set syslog level
13
 
14
# This file must be updated with any changes to, or additions to the options.
15
 
16
# Could not get numeric value to work for the --stats interval
17
# Considered parsing output of --help to complete options
18
 
19
have lldpad && _lldpad_options()
20
{
21
    local cur prev opts
22
    COMPREPLY=()
23
    cur="${COMP_WORDS[COMP_CWORD]}"
24
    prev="${COMP_WORDS[COMP_CWORD-1]}"
25
    opts="-h -f -d -k -s -v -V"
26
 
27
    case "${cur}" in
28
        *)
29
            COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
30
	    ;;
31
    esac
32
 
33
    case "${prev}" in
34
        -f)
35
	    _filedir
36
	    return 0
37
	    ;;
38
    esac
39
 
40
    return 0
41
}
42
complete -F _lldpad_options lldpad
43
 
44
# Local variables:
45
# mode: shell-script
46
# sh-basic-offset: 4
47
# sh-indent-comment: t
48
# indent-tabs-mode: nil
49
# End:
50
# ex: ts=4 sw=4 et filetype=sh