home · contact · privacy
Remove trailing whitespace from /help output.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 15 Sep 2025 07:14:42 +0000 (09:14 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 15 Sep 2025 07:14:42 +0000 (09:14 +0200)
ircplom/testing.py
ircplom/tui_base.py

index 56afde7953ac5dd041eb351edb575e2d5ae2b5d5..4eeb6d54fa0b88cfe7a97b795be5d3995237ee11 100644 (file)
@@ -13,14 +13,14 @@ _PLAYBOOK: tuple[str, ...] = (
     '> /help',
     '0 # commands available in this window:',
     '0 #   /connect HOST_PORT [NICKNAME_PW] [REALNAME]',
-    '0 #   /help ',
-    '0 #   /list ',
-    '0 #   /prompt_enter ',
-    '0 #   /quit ',
+    '0 #   /help',
+    '0 #   /list',
+    '0 #   /prompt_enter',
+    '0 #   /quit',
     '0 #   /window TOWARDS',
     '0 #   /window.history.scroll DIRECTION',
-    '0 #   /window.paste ',
-    '0 #   /window.prompt.backspace ',
+    '0 #   /window.paste',
+    '0 #   /window.prompt.backspace',
     '0 #   /window.prompt.move_cursor DIRECTION',
     '0 #   /window.prompt.scroll DIRECTION',
     '> /list',
index 41406b813f4099b2543b2102f8c27f1fc347c5a9..8fbea791b5cb93bbe262093e21996aa3b3812465 100644 (file)
@@ -577,13 +577,13 @@ class BaseTui(QueueMixin):
         self._log('commands available in this window:')
         to_log = []
         for cmd_name, cmd_data in self._commands.items():
-            args = []
+            to_print = [cmd_name]
             for idx, arg in enumerate(cmd_data[2]):
                 arg = arg.upper()
                 if idx >= cmd_data[1]:
                     arg = f'[{arg}]'
-                args += [arg]
-            to_log += [f'{cmd_name} {" ".join(args)}']
+                to_print += [arg]
+            to_log += [' '.join(to_print)]
         for item in sorted(to_log):
             self._log(f'  /{item}')