diff --git a/src/bub/builtin/tools.py b/src/bub/builtin/tools.py index 9c821573..1a673eb3 100644 --- a/src/bub/builtin/tools.py +++ b/src/bub/builtin/tools.py @@ -293,8 +293,8 @@ def show_help() -> str: " ,fs.write path=tmp.txt content='hello'\n" " ,fs.edit path=tmp.txt old=hello new=world\n" " ,bash cmd='sleep 5' background=true\n" - " ,bash_output shell_id=bsh-12345678\n" - " ,kill_bash shell_id=bsh-12345678\n" + " ,bash.output shell_id=bsh-12345678\n" + " ,bash.kill shell_id=bsh-12345678\n" "Any unknown command after ',' is executed as shell via bash." ) diff --git a/tests/test_cli_help.py b/tests/test_cli_help.py new file mode 100644 index 00000000..79732a4b --- /dev/null +++ b/tests/test_cli_help.py @@ -0,0 +1,16 @@ +from __future__ import annotations + +import pytest + +from bub.builtin.tools import show_help + + +@pytest.mark.asyncio +async def test_help_lists_correct_tool_names() -> None: + help_text = await show_help.run() + + assert ",bash.output" in help_text + assert ",bash.kill" in help_text + + assert ",bash_output" not in help_text + assert ",kill_bash" not in help_text