Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2174,7 +2174,7 @@ func TestCommand_Run_SubcommandFullPath(t *testing.T) {

outString := out.String()
require.Contains(t, outString, "foo bar - does bar things")
require.Contains(t, outString, "foo bar [command [command options]] [arguments...]")
require.Contains(t, outString, "foo bar [options] [arguments...]")
}

func TestCommand_Run_Help(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion 2 examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func ExampleCommand_Run_subcommandNoAction() {
// greet describeit - use it to see a description
//
// USAGE:
// greet describeit [command [command options]] [arguments...]
// greet describeit [options] [arguments...]
//
// DESCRIPTION:
// This is how we describe describeit the function
Expand Down
2 changes: 1 addition & 1 deletion 2 help_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ func TestShowSubcommandHelp_GlobalOptions(t *testing.T) {
foo frobbly

USAGE:
foo frobbly [command [command options]]
foo frobbly [options]

OPTIONS:
--bar string
Expand Down
2 changes: 1 addition & 1 deletion 2 template.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cli
var (
helpNameTemplate = `{{$v := offset .FullName 6}}{{wrap .FullName 3}}{{if .Usage}} - {{wrap .Usage $v}}{{end}}`
argsTemplate = `{{if .Arguments}}{{range .Arguments}}{{.Usage}}{{end}}{{end}}`
usageTemplate = `{{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.FullName}}{{if .VisibleFlags}} [command [command options]]{{end}}{{if .ArgsUsage}} {{.ArgsUsage}}{{else}}{{if .Arguments}} {{template "argsTemplate" .}}{{end}}{{end}}{{end}}`
usageTemplate = `{{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.FullName}}{{if .VisibleFlags}} [options]{{end}}{{if .VisibleCommands}} [command [command options]]{{end}}{{if .ArgsUsage}} {{.ArgsUsage}}{{else}}{{if .Arguments}} {{template "argsTemplate" .}}{{end}}{{end}}{{end}}`
descriptionTemplate = `{{wrap .Description 3}}`
authorsTemplate = `{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
{{range $index, $author := .Authors}}{{if $index}}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.