chinampa/internal/constants/help.md

1.8 KiB

{{- if not .HTMLOutput }}

{{ if and (not (eq .Spec.FullName "joao")) (not (eq .Command.Name "help")) }}joao {{ end }}{{ .Spec.FullName }}{{if eq .Command.Name "help"}} help{{end}}

{{- else }}

description: {{ .Command.Short }}

{{- end }}

{{ .Command.Short }}

Usage

﹅{{ replace .Command.UseLine " [flags]" "" }}{{if .Command.HasAvailableSubCommands}} SUBCOMMAND{{end}}﹅

{{ if .Command.HasAvailableSubCommands -}}

Subcommands

{{ $hh := .HTMLOutput -}} {{ range .Command.Commands -}} {{- if (or .IsAvailableCommand (eq .Name "help")) -}}

  • {{ if $hh -}} ﹅{{ .Name }}﹅ {{- else -}} ﹅{{ .Name }}﹅ {{- end }} - {{.Short}} {{ end }} {{- end -}} {{- end -}}

{{- if .Spec.Arguments -}}

Arguments

{{ range .Spec.Arguments -}}

  • ﹅{{ .Name | toUpper }}{{ if .Variadic}}...{{ end }}﹅{{ if .Required }} required{{ end }} - {{ .Description }} {{ end -}} {{- end -}}

{{ if and (eq .Spec.FullName "joao") (not (eq .Command.Name "help")) }}

Description

{{ .Spec.Description }} {{ end -}} {{- if .Spec.HasAdditionalHelp }} {{ .Spec.AdditionalHelp .HTMLOutput }} {{ end -}}

{{- if .Command.HasAvailableLocalFlags}}

Options

{{ range $name, $opt := .Spec.Options -}}

  • ﹅--{{ $name }}﹅ ({{$opt.Type}}): {{ trimSuffix $opt.Description "."}}.{{ if $opt.Default }} Default: {{ $opt.Default }}.{{ end }} {{ end -}} {{- end -}}

{{- if not (eq .Spec.FullName "joao") }}

Description

{{ if not (eq .Command.Long "") }}{{ .Command.Long }}{{ else }}{{ .Spec.Description }}{{end}} {{ end }}

{{- if .Command.HasAvailableInheritedFlags }}

Global Options

{{ range $name, $opt := .GlobalOptions -}}

  • ﹅--{{ $name }}﹅ ({{$opt.Type}}): {{$opt.Description}}.{{ if $opt.Default }} Default: {{ $opt.Default }}.{{ end }} {{ end -}} {{end}}