refactor: simplify usage text formatting (#2391)
This commit is contained in:
1 parent
5220cec2d0
commit
b83c65fabf
1 file changed
+9
-7
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user