Skip to content

Commit 27a0ef8

Browse files
committed
fix(fio): engines completion
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.
1 parent a18a07b commit 27a0ef8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

completions/fio

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

88
_comp_cmd_fio()

test/t/test_fio.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def test_cmdhelp_all(self, completion):
2323
def test_enghelp(self, completion):
2424
"""Test --enghelp parsing."""
2525
assert completion
26+
assert all(x == x.strip() for x in completion)
27+
assert all(")" not in x for x in completion)
2628

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

0 commit comments

Comments
 (0)