summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlja Neumann <[email protected]>2023-06-03 03:14:14 +0200
committerIlja Neumann <[email protected]>2023-06-03 03:33:10 +0200
commitccf62e0ffccbae98aeaf60d7fbe76ccc924de11e (patch)
tree817e340764ed6a0c8e155311e6c8d4037f15e5f2
parent5f10667949b09f9a43c241d969eea8d3ba9456c0 (diff)
don't print env-vars in usage line
-rw-r--r--usage.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/usage.go b/usage.go
index fb5da75..c76644f 100644
--- a/usage.go
+++ b/usage.go
@@ -84,12 +84,6 @@ func (p *Parser) writeUsageForSubcommand(w io.Writer, cmd *command) {
ancestors = append(ancestors, ancestor.name)
ancestor = ancestor.parent
}
- // Print environment only variables
- for _, spec := range cmd.specs {
- if spec.short == "" && spec.long == "" {
- ancestors = append(ancestors, "["+spec.env+"="+strings.ToLower(spec.env)+"_value"+"]")
- }
- }
// print the beginning of the usage string
fmt.Fprint(w, "Usage:")