2013-03-22 14:32:34 +00:00
|
|
|
have yandex-tank &&
|
2013-03-22 13:55:13 +00:00
|
|
|
_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
|
2013-03-22 14:18:15 +00:00
|
|
|
COMPREPLY=()
|
2013-03-22 14:32:34 +00:00
|
|
|
} &&
|
|
|
|
complete -o default -F _yandex_tank yandex-tank &&
|
|
|
|
complete -o default -F _yandex_tank yandex-tank-jmeter &&
|
|
|
|
complete -o default -F _yandex_tank yandex-tank-udp &&
|
|
|
|
complete -o default -F _yandex_tank yandex-tank-elliptics
|