Use HasAvailableFlags instead of HasFlags for Options in help

> HasAvailableFlags checks if the command contains any flags (local
> plus persistent from the entire structure) which are not hidden or
> deprecated.

This fix the `--help` display when the `Options` is empty (but
showing), like on `docker trust key`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2018-03-22 15:13:04 +01:00
parent c1b58a9096
commit 66fdd085a5
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ Examples:
{{ .Example }}
{{- end}}
{{- if .HasFlags}}
{{- if .HasAvailableFlags}}
Options:
{{ wrappedFlagUsages . | trimRightSpace}}