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

« back to all changes in this revision

Viewing changes to completions/pack200

  • 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
# pack200(1) completion                                    -*- shell-script -*-
 
2
 
 
3
_pack200()
 
4
{
 
5
    local cur prev words cword split
 
6
    _init_completion -s || return
 
7
 
 
8
    case $prev in
 
9
        -S|--segment-limit|-P|--pass-file|-C|--class-attribute|\
 
10
        -F|--field-attribute|-M|--method-attribute|-D|--code-attribute|\
 
11
        '-?'|-h|--help|-V|--version|-J)
 
12
            return 0
 
13
            ;;
 
14
        -E|--effort)
 
15
            COMPREPLY=( $( compgen -W '{0..9}' -- "$cur" ) )
 
16
            return 0
 
17
            ;;
 
18
        -H|--deflate-hint)
 
19
            COMPREPLY=( $( compgen -W 'true false keep' -- "$cur" ) )
 
20
            return 0
 
21
            ;;
 
22
        -m|--modification-time)
 
23
            COMPREPLY=( $( compgen -W 'latest keep' -- "$cur" ) )
 
24
            return 0
 
25
            ;;
 
26
        -U|--unknown-attribute)
 
27
            COMPREPLY=( $( compgen -W 'error strip pass' -- "$cur" ) )
 
28
            return 0
 
29
            ;;
 
30
        -f|--config-file)
 
31
            _filedir properties
 
32
            return 0
 
33
            ;;
 
34
        -l|--log-file)
 
35
            COMPREPLY=( $( compgen -W '-' -- "$cur" ) )
 
36
            _filedir log
 
37
            return 0
 
38
            ;;
 
39
        -r|--repack)
 
40
            _filedir jar
 
41
            return 0
 
42
            ;;
 
43
    esac
 
44
 
 
45
    $split && return
 
46
 
 
47
    # Check if a pack or a jar was already given.
 
48
    local i pack=false jar=false
 
49
    for (( i=0; i < ${#words[@]}-1; i++ )) ; do
 
50
        case ${words[i]} in
 
51
            *.pack|*.pack.gz) pack=true ;;
 
52
            *.jar) jar=true ;;
 
53
        esac
 
54
    done
 
55
 
 
56
    if ! $pack ; then
 
57
        if [[ "$cur" == -* ]] ; then
 
58
            COMPREPLY=( $( compgen -W '--no-gzip --gzip --strip-debug \
 
59
                --no-keep-file-order --segment-limit= --effort= \
 
60
                --deflate-hint= --modification-time= --pass-file= \
 
61
                --unknown-attribute= --class-attribute= --field-attribute= \
 
62
                --method-attribute= --code-attribute= --config-file= \
 
63
                --verbose --quiet --log-file= --help --version -J \
 
64
                --repack' -- "$cur" ) )
 
65
            [[ $COMPREPLY == *= ]] && compopt -o nospace
 
66
        else
 
67
            _filedir 'pack?(.gz)'
 
68
        fi
 
69
    elif ! $jar ; then
 
70
        _filedir jar
 
71
    fi
 
72
} &&
 
73
complete -F _pack200 pack200
 
74
 
 
75
# ex: ts=4 sw=4 et filetype=sh