diff --git a/gen/man.sh b/gen/man.sh index 099a266..f1eda46 100755 --- a/gen/man.sh +++ b/gen/man.sh @@ -35,7 +35,7 @@ lf \- terminal file manager .OP \-single .OP \-version .OP \-help -.RI [ directory ] +.RI [ select-path ] .YS .SH DESCRIPTION END diff --git a/lf.1 b/lf.1 index 98576ab..814fad3 100644 --- a/lf.1 +++ b/lf.1 @@ -16,7 +16,7 @@ lf \- terminal file manager .OP \-single .OP \-version .OP \-help -.RI [ directory ] +.RI [ select-path ] .YS .SH DESCRIPTION lf is a terminal file manager. diff --git a/main.go b/main.go index 46a7d5e..11f677b 100644 --- a/main.go +++ b/main.go @@ -185,6 +185,18 @@ func checkServer() { } 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] [select-path]\n\n", os.Args[0]) + fmt.Fprintln(f, " select-path") + fmt.Fprintln(f, " set the initial file selection to the given argument") + fmt.Fprintln(f, "") + fmt.Fprintln(f, "Options:") + flag.PrintDefaults() + } + showDoc := flag.Bool( "doc", false,