~ubuntu-branches/ubuntu/trusty/bash-completion/trusty-updates

« back to all changes in this revision

Viewing changes to completions/chkconfig

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2012-07-23 16:07:59 UTC
  • mfrom: (5.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20120723160759-lt9vn33dl3nak9l0
Tags: 1:2.0-1ubuntu1
* debian/maintscript, debian/postinst:
  - clean etc conffiles on upgrade since completion files are in /usr
    with the new version
* Resync with Debian, remaining diff
  * debian/patches/disable-avahi-browse.diff: Disable avahi-browse since
    it scales poorly in the current form: refresh patch
  * patches/101_bash_completion.oga_ogv.patch: Increase support for other
    OGG formats including .oga, .ogx, etc. (LP: #311525)
  * patches/103_colormake.patch: Add support for colormake to the make
    completion rules. (LP: #743208)
* Dropped changes:
  * Add conffile upgrade handling for a run of conffiles that were dropped
    since lucid: lucid upgrades are only supported to precise.
* Those fixes are in the new version
  * debian/patches/apt-get-changelog.patch:
  * Drop whitelists if they fail to produce any results:
  * patches/apt-get-download.patch: Add download as an apt-get
    sub-command (LP: #720541)
  * patches/102_manpager.patch: Override MANPAGER when generating perldoc
    completions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# chkconfig(8) completion
 
1
# chkconfig(8) completion                                  -*- shell-script -*-
2
2
 
3
 
have chkconfig &&
4
3
_chkconfig()
5
4
{
6
 
    local cur prev split=false
7
 
 
8
 
    COMPREPLY=()
9
 
    _get_comp_words_by_ref cur prev
10
 
 
11
 
    _split_longopt && split=true
 
5
    local cur prev words cword split
 
6
    _init_completion -s || return
12
7
 
13
8
    case $prev in
14
9
        --level=[1-6]|[1-6]|--list|--add|--del|--override)
15
10
            _services
 
11
            _xinetd_services
16
12
            return 0
17
13
            ;;
18
14
        --level)
19
 
            COMPREPLY=( $( compgen -W '1 2 3 4 5 6' -- "$cur" ) )
 
15
            COMPREPLY=( $( compgen -W '{1..6}' -- "$cur" ) )
20
16
            return 0
21
17
            ;;
22
18
    esac
24
20
    $split && return 0
25
21
 
26
22
    if [[ "$cur" == -* ]]; then
27
 
        COMPREPLY=( $( compgen -W '--list --add --del --override --level' -- "$cur" ) )
 
23
        COMPREPLY=( $( compgen -W '--list --add --del --override --level' \
 
24
            -- "$cur" ) )
28
25
    else
29
 
        if [[ $COMP_CWORD -eq 2 || $COMP_CWORD -eq 4 ]]; then
30
 
            COMPREPLY=( $( compgen -W 'on off reset resetpriorities' -- "$cur" ) )
 
26
        if [[ $cword -eq 2 || $cword -eq 4 ]]; then
 
27
            COMPREPLY=( $( compgen -W 'on off reset resetpriorities' \
 
28
                -- "$cur" ) )
31
29
        else
32
30
            _services
 
31
            _xinetd_services
33
32
        fi
34
33
    fi
35
34
} &&
36
35
complete -F _chkconfig chkconfig
37
36
 
38
 
# Local variables:
39
 
# mode: shell-script
40
 
# sh-basic-offset: 4
41
 
# sh-indent-comment: t
42
 
# indent-tabs-mode: nil
43
 
# End:
44
37
# ex: ts=4 sw=4 et filetype=sh