Skip to content

Commit

Permalink
feat(iperf): --tos/-S argument completion
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Apr 30, 2024
1 parent eac47f7 commit d2f59bb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions completions/iperf
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ _comp_cmd_iperf()
local cur prev words cword was_split comp_args
_comp_initialize -s -n : -- "$@" || return

local noargopts='!(-*|*[ilpwMXbntLPTZCkOSAfIoFBcxy]*)'
local noargopts='!(-*|*[ilpwMXbntLPTZCkOAfIoFBcxy]*)'
# shellcheck disable=SC2254
case $prev in
--help | --version | --interval | --len | --port | --window | --mss | --bandwidth | \
--num | --time | --listenport | --parallel | --ttl | --linux-congestion | --omit | \
--congestion | --bytes | --blockcount | --cport | --set-mss | --flowlabel | \
--title | --tos | --affinity | --rcv-timeout | --server-bitrate-limit | \
--title | --affinity | --rcv-timeout | --server-bitrate-limit | \
--idle-timeout | --time-skew-threshold | --xbind | --nstreams | --connect-timeout | \
--bitrate | --pacing-timer | --fq-rate | --length | --dscp | --extra-data | \
--username | -${noargopts}[hvilpwMXbntLPTZCkOSA])
--username | -${noargopts}[hvilpwMXbntLPTZCkOA])
return
;;
--format | -${noargopts}f)
Expand Down Expand Up @@ -59,6 +59,10 @@ _comp_cmd_iperf()
_comp_compgen_filedir log
return
;;
--tos | -${noargopts}S)
_comp_compgen -- -W '{0..255}'
return
;;
--rsa-private-key-path | --rsa-public-key-path)
_comp_compgen_filedir pem
return
Expand Down

0 comments on commit d2f59bb

Please sign in to comment.