diff --git a/tools/ratbagctl.body.py.in b/tools/ratbagctl.body.py.in index 3832c198..45470741 100755 --- a/tools/ratbagctl.body.py.in +++ b/tools/ratbagctl.body.py.in @@ -25,6 +25,7 @@ import evdev import subprocess import sys import argparse +import textwrap from typing import Any, Callable, Dict, List, Optional, Tuple, Union # This must be on a single line, as we replace it using merge_ratbagd.py while building. @@ -1543,9 +1544,7 @@ class RatbagParserSwitch(RatbagParser): def _print_help(self, prefix: str) -> None: if self.help and self.group is not None: - help_lines = self.help.split("\n") - help_indented = "\n ".join(help_lines) - print(" ", help_indented, "\n") + print(textwrap.indent(self.help, " "), "\n") for e in self.switch: e.print_help(None, f"{prefix}{self.name} ") if self.N_access is not None: