1
# iperf(1) completion -*- shell-script -*-
5
local cur prev words cword split
6
_init_completion -s || return
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)
15
COMPREPLY=( $( compgen -W 'k m K M' -- "$cur" ) )
18
-o|--output|-F|--fileinput)
23
_available_interfaces -a
28
_known_hosts_real "$cur"
32
COMPREPLY=( $( compgen -W 'C D M S V' -- "$cur" ) )
36
COMPREPLY=( $( compgen -W 'C' -- "$cur" ) )
43
# Filter mode specific options
45
for i in ${words[@]}; do
48
filter='sed -e /^Client.specific/,/^$/d'
51
filter='sed -e /^Server.specific/,/^$/d'
55
[[ $filter != cat ]] && filter+=' -e /--client/d -e /--server/d'
57
COMPREPLY=( $( compgen -W \
58
'$( "$1" --help 2>&1 | $filter | _parse_help - )' -- "$cur" ) )
59
[[ $COMPREPLY == *= ]] && compopt -o nospace
61
complete -F _iperf iperf
63
# ex: ts=4 sw=4 et filetype=sh