don't print env-vars in usage line
This commit is contained in:
parent
5f10667949
commit
ccf62e0ffc
6
usage.go
6
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:")
|
||||
|
|
Loading…
Reference in New Issue