From b83c65fabf3784020eed9807ea0882741bb7fd88 Mon Sep 17 00:00:00 2001 From: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com> Date: Fri, 13 Feb 2026 02:48:36 +0100 Subject: [PATCH] refactor: simplify usage text formatting (#2391) --- main.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index dec40dd6..0a6d1998 100644 --- a/main.go +++ b/main.go @@ -225,13 +225,15 @@ func printVersion() { func main() { flag.Usage = func() { f := flag.CommandLine.Output() - fmt.Fprintln(f, "lf - Terminal file manager") - fmt.Fprintln(f, "") - fmt.Fprintf(f, "Usage: %s [options] [cd-or-select-path]\n\n", os.Args[0]) - fmt.Fprintln(f, " cd-or-select-path") - fmt.Fprintln(f, " set the initial dir or file selection to the given argument") - fmt.Fprintln(f, "") - fmt.Fprintln(f, "Options:") + fmt.Fprintf(f, `lf - Terminal file manager + +Usage: %s [options] [cd-or-select-path] + + cd-or-select-path + set the initial dir or file selection to the given argument + +Options: +`, os.Args[0]) flag.PrintDefaults() }