summaryrefslogtreecommitdiff
path: root/usage.go
diff options
context:
space:
mode:
authorHugo Hromic <[email protected]>2024-07-22 19:18:14 +0100
committerHugo Hromic <[email protected]>2024-07-22 19:25:51 +0100
commitbf156d17a378826a4832340c79f07aab30578fa8 (patch)
tree023242966179c40641f04758a3f43b2ec7c8d5c7 /usage.go
parent3de7278c4f091f643033f3ebc8fe670c6e7ff7dd (diff)
Fix help text for positional args with default and env var
Diffstat (limited to 'usage.go')
-rw-r--r--usage.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/usage.go b/usage.go
index 66a5be9..8a7c139 100644
--- a/usage.go
+++ b/usage.go
@@ -260,7 +260,7 @@ func (p *Parser) WriteHelpForSubcommand(w io.Writer, subcommand ...string) error
if len(positionals) > 0 {
fmt.Fprint(w, "\nPositional arguments:\n")
for _, spec := range positionals {
- print(w, spec.placeholder, spec.help)
+ print(w, spec.placeholder, spec.help, withDefault(spec.defaultString), withEnv(spec.env))
}
}