git » summer » commit d113d75

help: Clarify that flags come before the command

author Alberto Bertogli
2023-08-18 09:54:06 UTC
committer Alberto Bertogli
2023-08-19 11:19:18 UTC
parent 321eb6b50b6a8b600fd4b275144062b9e269b166

help: Clarify that flags come before the command

In the command-line help, clarify that the flags come before the
command, which is not obvious and can be confusing.

Maybe in the future we will change this behaviour to accept flags before
and after.

summer.go +4 -4
test/help.t +12 -12

diff --git a/summer.go b/summer.go
index 2ed5c81..e7f19e1 100644
--- a/summer.go
+++ b/summer.go
@@ -23,17 +23,17 @@ Checksums are written to/read from each file's extended attributes.
 
 Usage:
 
-  summer update <dir>
+  summer [flags] update <dir>
       Verify checksums in the given directory, and update them for new or
       changed files.
-  summer verify <dir>
+  summer [flags] verify <dir>
       Verify checksums in the given directory.
-  summer generate <dir>
+  summer [flags] generate <dir>
       Write checksums for the given directory. Files with pre-existing
       checksums are left untouched, and checksums are not verified.
       Useful when generating checksums for a lot of files for the first time,
       as is faster to resume work if interrupted.
-  summer version
+  summer [flags] version
       Print software version information.
 
 Flags:
diff --git a/test/help.t b/test/help.t
index 81431cd..4d5cea6 100644
--- a/test/help.t
+++ b/test/help.t
@@ -14,17 +14,17 @@ No arguments.
   
   Usage:
   
-    summer update <dir>
+    summer [flags] update <dir>
         Verify checksums in the given directory, and update them for new or
         changed files.
-    summer verify <dir>
+    summer [flags] verify <dir>
         Verify checksums in the given directory.
-    summer generate <dir>
+    summer [flags] generate <dir>
         Write checksums for the given directory. Files with pre-existing
         checksums are left untouched, and checksums are not verified.
         Useful when generating checksums for a lot of files for the first time,
         as is faster to resume work if interrupted.
-    summer version
+    summer [flags] version
         Print software version information.
   
   Flags:
@@ -53,17 +53,17 @@ Too few arguments.
   
   Usage:
   
-    summer update <dir>
+    summer [flags] update <dir>
         Verify checksums in the given directory, and update them for new or
         changed files.
-    summer verify <dir>
+    summer [flags] verify <dir>
         Verify checksums in the given directory.
-    summer generate <dir>
+    summer [flags] generate <dir>
         Write checksums for the given directory. Files with pre-existing
         checksums are left untouched, and checksums are not verified.
         Useful when generating checksums for a lot of files for the first time,
         as is faster to resume work if interrupted.
-    summer version
+    summer [flags] version
         Print software version information.
   
   Flags:
@@ -92,17 +92,17 @@ No valid path (the argument is given, but it is empty).
   
   Usage:
   
-    summer update <dir>
+    summer [flags] update <dir>
         Verify checksums in the given directory, and update them for new or
         changed files.
-    summer verify <dir>
+    summer [flags] verify <dir>
         Verify checksums in the given directory.
-    summer generate <dir>
+    summer [flags] generate <dir>
         Write checksums for the given directory. Files with pre-existing
         checksums are left untouched, and checksums are not verified.
         Useful when generating checksums for a lot of files for the first time,
         as is faster to resume work if interrupted.
-    summer version
+    summer [flags] version
         Print software version information.
   
   Flags: