Skip to content

Commit dfa0538

Browse files
Add extra padding after named arguments section in help text (#172)
1 parent b6a06ea commit dfa0538

4 files changed

Lines changed: 4 additions & 2 deletions

File tree

command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ func writePositionalArgs(cmd *Command, s *strings.Builder) {
611611
func writeArgumentsSection(cmd *Command, s *strings.Builder) error {
612612
s.WriteString("\n\n")
613613
s.WriteString(style.Title.Text("Arguments"))
614-
s.WriteString(":\n")
614+
s.WriteString(":\n\n")
615615
tw := tabwriter.NewWriter(s, style.MinWidth, style.TabWidth, style.Padding, style.PadChar, style.Flags)
616616

617617
for _, arg := range cmd.positionalArgs {

internal/flag/flag.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Package flag provides a command line flag definition and parsing library.
22
//
3-
// Flag is intentionally internal so the only interraction is via the Flag option on a command.
3+
// Flag is intentionally internal so the only interaction is via the Flag option on a command.
44
package flag
55

66
import (

testdata/snapshots/TestHelp/with_named_arguments.snap.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ A placeholder for something cool
33
Usage: test [OPTIONS] SRC [DEST] [OTHER]
44

55
Arguments:
6+
67
src The file to copy [required]
78
dest Destination to copy to [default ./dest]
89
other Something else [default ""]

testdata/snapshots/TestHelp/with_verbosity_count.snap.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ A placeholder for something cool
33
Usage: test [OPTIONS] SRC [DEST]
44

55
Arguments:
6+
67
src The file to copy [required]
78
dest Destination to copy to [default ./dest]
89

0 commit comments

Comments
 (0)