summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-cli/tests/test_cli_actions.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-15 09:33:28 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-15 09:33:28 +0200
commit5044bdfdfffceceecc0d92a776983ad361079839 (patch)
tree4a80ab66ef53f9ba76cdf8db4276dfc07d0fc1f7 /packages/meshbay-cli/tests/test_cli_actions.py
parent1e8eae1f3de765fcd8163716de6e5fe5aab5a034 (diff)
downloadmeshbay-5044bdfdfffceceecc0d92a776983ad361079839.tar.gz
feat(cli): help, and right-click copy and paste in the interactive chat
help prints what --help prints; help ACTION, what ACTION --help prints. In the interactive chat a right-click on the conversation copies the text selected with the mouse, else the line under the pointer: to the terminal (OSC 52) and to the platform's clipboard tool. A right-click on the line written in pastes the system clipboard's text at the cursor, its lines side by side, read with wl-paste, xclip or xsel, pbpaste or PowerShell, else what was copied here last. The conversation is selectable with the mouse, which RichLog alone is not. The deb and rpm packages recommend wl-clipboard or xclip for the paste. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-cli/tests/test_cli_actions.py')
-rw-r--r--packages/meshbay-cli/tests/test_cli_actions.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/meshbay-cli/tests/test_cli_actions.py b/packages/meshbay-cli/tests/test_cli_actions.py
index 5443d9b..240ac67 100644
--- a/packages/meshbay-cli/tests/test_cli_actions.py
+++ b/packages/meshbay-cli/tests/test_cli_actions.py
@@ -203,6 +203,19 @@ def test_a_usage_error_is_exit_1_not_the_sign_in_code(capsys):
+def test_help_prints_what_help_prints(capsys):
+ assert cli.main(["--help"]) == 0
+ whole = capsys.readouterr().out
+ assert main("help") == 0
+ assert capsys.readouterr().out == whole
+ assert cli.main(["chat", "--help"]) == 0
+ chat = capsys.readouterr().out
+ assert main("help", "chat") == 0
+ assert capsys.readouterr().out == chat
+ assert main("help", "no-such-action") == 1
+ assert "No action 'no-such-action'" in capsys.readouterr().err
+
+
def test_groups_lists_each_group_with_its_state(hub, capsys):
hub.groups.append({"id": "g2", "name": "Club/Photos", "owner_username": "bob-test",
"node_online": False, "visibility": "public", "is_admin": False,