From f735ff04b4e5678802bd8ab174051952cb32c6c8 Mon Sep 17 00:00:00 2001 From: Dmytro Maluka Date: Mon, 21 Jul 2025 01:07:39 +0200 Subject: [PATCH] Improve `micro -help` output --- cmd/micro/micro.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cmd/micro/micro.go b/cmd/micro/micro.go index 159e646f..8a23b1b0 100644 --- a/cmd/micro/micro.go +++ b/cmd/micro/micro.go @@ -47,23 +47,24 @@ var ( func InitFlags() { flag.Usage = func() { - fmt.Println("Usage: micro [OPTIONS] [FILE]...") + fmt.Println("Usage: micro [OPTION]... [FILE]... [+LINE[:COL]]") + fmt.Println(" micro [OPTION]... [FILE[:LINE[:COL]]]... (only if the `parsecursor` option is enabled)") fmt.Println("-clean") - fmt.Println(" \tCleans the configuration directory") + fmt.Println(" \tClean the configuration directory and exit") fmt.Println("-config-dir dir") fmt.Println(" \tSpecify a custom location for the configuration directory") - fmt.Println("[FILE]:LINE:COL (if the `parsecursor` option is enabled)") - fmt.Println("+LINE:COL") + fmt.Println("FILE:LINE[:COL] (only if the `parsecursor` option is enabled)") + fmt.Println("FILE +LINE[:COL]") fmt.Println(" \tSpecify a line and column to start the cursor at when opening a buffer") fmt.Println("-options") - fmt.Println(" \tShow all option help") + fmt.Println(" \tShow all options help and exit") fmt.Println("-debug") fmt.Println(" \tEnable debug mode (enables logging to ./log.txt)") fmt.Println("-profile") fmt.Println(" \tEnable CPU profiling (writes profile info to ./micro.prof") fmt.Println(" \tso it can be analyzed later with \"go tool pprof micro.prof\")") fmt.Println("-version") - fmt.Println(" \tShow the version number and information") + fmt.Println(" \tShow the version number and information and exit") fmt.Print("\nMicro's plugins can be managed at the command line with the following commands.\n") fmt.Println("-plugin install [PLUGIN]...") @@ -80,7 +81,7 @@ func InitFlags() { fmt.Println(" \tList available plugins") 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") - fmt.Println("-option value") + fmt.Println("-