@@ -78,10 +78,10 @@ func runPlaceholderCommand(command string, args []string, stdout io.Writer) erro
7878}
7979
8080func runRepoInit (args []string , stdout io.Writer , stderr io.Writer ) error {
81- fs := flag .NewFlagSet ("mainline repo init" , flag .ContinueOnError )
81+ fs := flag .NewFlagSet (currentCLIProgramName () + " repo init" , flag .ContinueOnError )
8282 fs .SetOutput (stderr )
83- setFlagUsage (fs , `Usage:
84- mainline repo init [flags]
83+ setFlagUsage (fs , fmt . Sprintf ( `Usage:
84+ %s repo init [flags]
8585
8686Initialize durable mq state for the current repo and scaffold mainline.toml.
8787
@@ -93,7 +93,7 @@ Then install hooks:
9393 ./scripts/install-hooks.sh
9494
9595Flags:
96- ` )
96+ ` , currentCLIProgramName ()) )
9797
9898 var repoPath string
9999 var protectedBranch string
@@ -210,10 +210,10 @@ Flags:
210210}
211211
212212func runRepoShow (args []string , stdout io.Writer , stderr io.Writer ) error {
213- fs := flag .NewFlagSet ("mainline repo show" , flag .ContinueOnError )
213+ fs := flag .NewFlagSet (currentCLIProgramName () + " repo show" , flag .ContinueOnError )
214214 fs .SetOutput (stderr )
215- setFlagUsage (fs , `Usage:
216- mainline repo show [flags]
215+ setFlagUsage (fs , fmt . Sprintf ( `Usage:
216+ %s repo show [flags]
217217
218218Show the stored repo config, protected-branch status, and discovered worktrees.
219219
@@ -222,7 +222,7 @@ Examples:
222222 mq repo show --json
223223
224224Flags:
225- ` )
225+ ` , currentCLIProgramName ()) )
226226
227227 var repoPath string
228228 var asJSON bool
@@ -314,10 +314,10 @@ Flags:
314314}
315315
316316func runDoctor (args []string , stdout io.Writer , stderr io.Writer ) error {
317- fs := flag .NewFlagSet ("mainline doctor" , flag .ContinueOnError )
317+ fs := flag .NewFlagSet (currentCLIProgramName () + " doctor" , flag .ContinueOnError )
318318 fs .SetOutput (stderr )
319- setFlagUsage (fs , `Usage:
320- mainline doctor [flags]
319+ setFlagUsage (fs , fmt . Sprintf ( `Usage:
320+ %s doctor [flags]
321321
322322Inspect repo health and optionally apply safe automatic recovery steps.
323323
@@ -326,7 +326,7 @@ Examples:
326326 mq doctor --repo /path/to/protected-main --fix --json
327327
328328Flags:
329- ` )
329+ ` , currentCLIProgramName ()) )
330330
331331 var repoPath string
332332 var asJSON bool
0 commit comments