Skip to content

Commit

Permalink
fix(sysbench): fix extraction of test-name option
Browse files Browse the repository at this point in the history
The `=` seems to be missing in the pattern.  This pattern was in this
form from the beginning when the sysbench completion is introduced in
commit 77b78b3.  With the current implementation, `--test`,
`--testxxxx`, etc. can also match, and $test becomes `--test`,
`--testxxxx`, etc.  This results in the later evaluation of
`--test=--test` or `--test=--testxxxx`, which doesn't seem to be
correct.  Therefore, `=` is suspected to be missing.
  • Loading branch information
akinomyoga committed Sep 25, 2023
1 parent 4447f83 commit cc246a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion completions/sysbench
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ _comp_cmd_sysbench()
local i test="" has_test=""
for ((i = 1; i < ${#words[@]} - 1; i++)); do
# TODO --test= is deprecated, bare test name preferred
if [[ ${words[i]} == --test* ]]; then
if [[ ${words[i]} == --test=* ]]; then
test=${words[i]#*=}
has_test=set
break
Expand Down

0 comments on commit cc246a1

Please sign in to comment.