don't print env-vars in usage line

This commit is contained in:
Ilja Neumann 2023-06-03 03:14:14 +02:00
parent 5f10667949
commit ccf62e0ffc
1 changed files with 0 additions and 6 deletions

View File

@ -84,12 +84,6 @@ func (p *Parser) writeUsageForSubcommand(w io.Writer, cmd *command) {
ancestors = append(ancestors, ancestor.name) ancestors = append(ancestors, ancestor.name)
ancestor = ancestor.parent 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 // print the beginning of the usage string
fmt.Fprint(w, "Usage:") fmt.Fprint(w, "Usage:")