diff options
Diffstat (limited to 'usage.go')
| -rw-r--r-- | usage.go | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -76,17 +76,16 @@ func (p *Parser) writeUsageForCommand(w io.Writer, cmd *command) { for _, spec := range positionals { // prefix with a space fmt.Fprint(w, " ") - up := strings.ToUpper(spec.long) if spec.multiple { if !spec.required { fmt.Fprint(w, "[") } - fmt.Fprintf(w, "%s [%s ...]", up, up) + fmt.Fprintf(w, "%s [%s ...]", spec.placeholder, spec.placeholder) if !spec.required { fmt.Fprint(w, "]") } } else { - fmt.Fprint(w, up) + fmt.Fprint(w, spec.placeholder) } } fmt.Fprint(w, "\n") @@ -134,7 +133,7 @@ func (p *Parser) writeHelpForCommand(w io.Writer, cmd *command) { if len(positionals) > 0 { fmt.Fprint(w, "\nPositional arguments:\n") for _, spec := range positionals { - printTwoCols(w, strings.ToUpper(spec.long), spec.help, "") + printTwoCols(w, spec.placeholder, spec.help, "") } } @@ -180,7 +179,7 @@ func synopsis(spec *spec, form string) string { if spec.boolean { return form } - return form + " " + strings.ToUpper(spec.long) + return form + " " + spec.placeholder } func ptrTo(s string) *string { |
