mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-06 18:35:18 +00:00
24 lines
696 B
Plaintext
24 lines
696 B
Plaintext
|
have yandex-tank &&
|
||
|
_yandex_tank()
|
||
|
{
|
||
|
local cur prev opts
|
||
|
COMPREPLY=()
|
||
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||
|
|
||
|
if [[ ${cur} == -* ]] ; then
|
||
|
opts=`yandex-tank --bash-switches-list`
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
|
||
|
if [[ ${prev} == -o ]] ; then
|
||
|
opts=`yandex-tank --bash-options-prev="${prev}" --bash-options-cur="${cur}"`
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
} &&
|
||
|
complete -F _yandex_tank yandex-tank &&
|
||
|
complete -F _yandex_tank yandex-tank-jmeter &&
|
||
|
complete -F _yandex_tank yandex-tank-udp &&
|
||
|
complete -F _yandex_tank yandex-tank-elliptics
|