Skip to content

Commit

Permalink
fix(fio): engines completion
Browse files Browse the repository at this point in the history
Rows in `--enghelp` output that contain engine names start with a tab as
of fio 3.35.

Remove spurious closing parenthesis introduced in commit
a1dd4d0.
  • Loading branch information
scop committed Apr 20, 2024
1 parent a18a07b commit 27a0ef8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion completions/fio
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

_comp_cmd_fio__compgen_engines()
{
_comp_compgen_split -l -- "$("$1" --enghelp 2>/dev/null | command sed -ne '/^[[:space:]]/p'))"
_comp_compgen_split -F $'\t\n' -- "$("$1" --enghelp 2>/dev/null | command sed -ne '/^[[:space:]]/p')"
}

_comp_cmd_fio()
Expand Down
2 changes: 2 additions & 0 deletions test/t/test_fio.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def test_cmdhelp_all(self, completion):
def test_enghelp(self, completion):
"""Test --enghelp parsing."""
assert completion
assert all(x == x.strip() for x in completion)
assert all(")" not in x for x in completion)

@pytest.mark.complete("fio --unlink=", require_cmd=True)
def test_cmdhelp_boolean(self, completion):
Expand Down

0 comments on commit 27a0ef8

Please sign in to comment.