Skip to content

Commit

Permalink
fix: Fix repeated [arguments...] in usage template
Browse files Browse the repository at this point in the history
  • Loading branch information
edeustua committed Feb 22, 2024
1 parent 8728c19 commit 427677a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion template.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cli

var helpNameTemplate = `{{$v := offset .HelpName 6}}{{wrap .HelpName 3}}{{if .Usage}} - {{wrap .Usage $v}}{{end}}`
var usageTemplate = `{{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}}[arguments...]{{end}}[arguments...]{{end}}{{end}}`
var usageTemplate = `{{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}}[arguments...]{{end}}{{end}}{{end}}`
var descriptionTemplate = `{{wrap .Description 3}}`
var authorsTemplate = `{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
{{range $index, $author := .Authors}}{{if $index}}
Expand Down

0 comments on commit 427677a

Please sign in to comment.