Skip to content

Commit f735ff0

Browse files
committed
Improve micro -help output
1 parent 86a9fac commit f735ff0

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

cmd/micro/micro.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,24 @@ var (
4747

4848
func InitFlags() {
4949
flag.Usage = func() {
50-
fmt.Println("Usage: micro [OPTIONS] [FILE]...")
50+
fmt.Println("Usage: micro [OPTION]... [FILE]... [+LINE[:COL]]")
51+
fmt.Println(" micro [OPTION]... [FILE[:LINE[:COL]]]... (only if the `parsecursor` option is enabled)")
5152
fmt.Println("-clean")
52-
fmt.Println(" \tCleans the configuration directory")
53+
fmt.Println(" \tClean the configuration directory and exit")
5354
fmt.Println("-config-dir dir")
5455
fmt.Println(" \tSpecify a custom location for the configuration directory")
55-
fmt.Println("[FILE]:LINE:COL (if the `parsecursor` option is enabled)")
56-
fmt.Println("+LINE:COL")
56+
fmt.Println("FILE:LINE[:COL] (only if the `parsecursor` option is enabled)")
57+
fmt.Println("FILE +LINE[:COL]")
5758
fmt.Println(" \tSpecify a line and column to start the cursor at when opening a buffer")
5859
fmt.Println("-options")
59-
fmt.Println(" \tShow all option help")
60+
fmt.Println(" \tShow all options help and exit")
6061
fmt.Println("-debug")
6162
fmt.Println(" \tEnable debug mode (enables logging to ./log.txt)")
6263
fmt.Println("-profile")
6364
fmt.Println(" \tEnable CPU profiling (writes profile info to ./micro.prof")
6465
fmt.Println(" \tso it can be analyzed later with \"go tool pprof micro.prof\")")
6566
fmt.Println("-version")
66-
fmt.Println(" \tShow the version number and information")
67+
fmt.Println(" \tShow the version number and information and exit")
6768

6869
fmt.Print("\nMicro's plugins can be managed at the command line with the following commands.\n")
6970
fmt.Println("-plugin install [PLUGIN]...")
@@ -80,7 +81,7 @@ func InitFlags() {
8081
fmt.Println(" \tList available plugins")
8182

8283
fmt.Print("\nMicro's options can also be set via command line arguments for quick\nadjustments. For real configuration, please use the settings.json\nfile (see 'help options').\n\n")
83-
fmt.Println("-option value")
84+
fmt.Println("-<option> value")
8485
fmt.Println(" \tSet `option` to `value` for this session")
8586
fmt.Println(" \tFor example: `micro -syntax off file.c`")
8687
fmt.Println("\nUse `micro -options` to see the full list of configuration options")

0 commit comments

Comments
 (0)