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

« back to all changes in this revision

Viewing changes to completions/iperf

  • 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
# iperf(1) completion                                      -*- shell-script -*-
 
2
 
 
3
_iperf()
 
4
{
 
5
    local cur prev words cword split
 
6
    _init_completion -s || return
 
7
 
 
8
    case $prev in
 
9
        -h|--help|-v|--version|-i|--interval|-l|--len|-p|--port|-w|--window|\
 
10
        -M|--mss|-b|--bandwidth|-n|--num|-t|--time|-L|--listenport|-P|\
 
11
        --parallel|-T|--ttl|-Z|--linux-congestion)
 
12
            return
 
13
            ;;
 
14
        -f|--format)
 
15
            COMPREPLY=( $( compgen -W 'k m K M' -- "$cur" ) )
 
16
            return
 
17
            ;;
 
18
        -o|--output|-F|--fileinput)
 
19
            _filedir
 
20
            return
 
21
            ;;
 
22
        -B|--bind)
 
23
            _available_interfaces -a
 
24
            _ip_addresses
 
25
            return
 
26
            ;;
 
27
        -c|--client)
 
28
            _known_hosts_real "$cur"
 
29
            return
 
30
            ;;
 
31
        -x|--reportexclude)
 
32
            COMPREPLY=( $( compgen -W 'C D M S V' -- "$cur" ) )
 
33
            return
 
34
            ;;
 
35
        -y|--reportstyle)
 
36
            COMPREPLY=( $( compgen -W 'C' -- "$cur" ) )
 
37
            return
 
38
            ;;
 
39
    esac
 
40
 
 
41
    $split && return
 
42
 
 
43
    # Filter mode specific options
 
44
    local i filter=cat
 
45
    for i in ${words[@]}; do
 
46
        case $i in
 
47
            -s|--server)
 
48
                filter='sed -e /^Client.specific/,/^$/d'
 
49
                ;;
 
50
            -c|--client)
 
51
                filter='sed -e /^Server.specific/,/^$/d'
 
52
                ;;
 
53
        esac
 
54
    done
 
55
    [[ $filter != cat ]] && filter+=' -e /--client/d -e /--server/d'
 
56
 
 
57
    COMPREPLY=( $( compgen -W \
 
58
        '$( "$1" --help 2>&1 | $filter | _parse_help - )' -- "$cur" ) )
 
59
    [[ $COMPREPLY == *= ]] && compopt -o nospace
 
60
} &&
 
61
complete -F _iperf iperf
 
62
 
 
63
# ex: ts=4 sw=4 et filetype=sh