From f1dd3a085b029ecf29b75373c0f7c982dbe72b88 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 7 Aug 2026 20:32:24 +0900 Subject: command: hard wrap help message flags This greatly improves readability when lots of flags are registered. Signed-off-by: Ophestra --- cmd/hakurei/command_test.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'cmd') diff --git a/cmd/hakurei/command_test.go b/cmd/hakurei/command_test.go index b90688e5..61374cd8 100644 --- a/cmd/hakurei/command_test.go +++ b/cmd/hakurei/command_test.go @@ -19,10 +19,9 @@ func TestHelp(t *testing.T) { want string }{ { - "main", []string{}, ` -Usage: hakurei [-h | --help] [-v] [--insecure] [--json] COMMAND [OPTIONS] + "main", []string{}, `usage: hakurei [-h | --help] [-v] [--insecure] [--json] [] -Commands: +commands: run Load and start container from configuration file exec Configure and start a permissive container show Show live or local instance configuration @@ -35,10 +34,14 @@ Commands: `, }, { - "exec", []string{"exec", "-h"}, ` -Usage: hakurei exec [-h | --help] [--dbus-config ] [--dbus-system ] [--mpris] [--dbus-log] [--id ] [-a ] [-g ] [-d ] [-u ] [--policy ] [--priority ] [--private-runtime] [--private-tmpdir] [--wayland] [-X] [--dbus] [--pipewire] [--pulse] COMMAND [OPTIONS] + "exec", []string{"exec", "-h"}, `usage: hakurei exec [-h | --help] [--dbus-config ] + [--dbus-system ] [--mpris] [--dbus-log] + [--id ] [-a ] [-g ] [-d ] + [-u ] [--policy ] [--priority ] + [--private-runtime] [--private-tmpdir] [--wayland] [-X] + [--dbus] [--pipewire] [--pulse] [] -Flags: +flags: -X Enable direct connection to X11 -a int Application identity -- cgit v1.3.1