Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
c0b3b437
Commit
c0b3b437
authored
Nov 12, 2014
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmds2/helptext moved indent + tagline in subcmd
parent
80d74354
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
commands/cli/helptext.go
commands/cli/helptext.go
+5
-4
No files found.
commands/cli/helptext.go
View file @
c0b3b437
...
...
@@ -242,7 +242,6 @@ func argumentText(cmd *cmds.Command) []string {
for
i
,
arg
:=
range
cmd
.
Arguments
{
lines
[
i
]
=
argUsageText
(
arg
)
+
" - "
+
arg
.
Description
lines
[
i
]
=
indentString
(
lines
[
i
],
" "
)
}
return
lines
...
...
@@ -296,7 +295,6 @@ func optionText(cmd ...*cmds.Command) []string {
// add option descriptions to output
for
i
,
opt
:=
range
options
{
lines
[
i
]
+=
" - "
+
opt
.
Description
lines
[
i
]
=
indentString
(
lines
[
i
],
" "
)
}
return
lines
...
...
@@ -315,8 +313,11 @@ func subcommandText(cmd *cmds.Command, rootName string, path []string) []string
if
len
(
usage
)
>
0
{
usage
=
" "
+
usage
}
lines
[
i
]
=
fmt
.
Sprintf
(
"%v%v%v - %v"
,
prefix
,
name
,
usage
,
sub
.
Description
)
lines
[
i
]
=
indentString
(
lines
[
i
],
" "
)
if
len
(
sub
.
Helptext
.
Tagline
)
>
0
{
lines
[
i
]
=
fmt
.
Sprintf
(
"%v%v%v - %v"
,
prefix
,
name
,
usage
,
sub
.
Helptext
.
Tagline
)
}
else
{
lines
[
i
]
=
fmt
.
Sprintf
(
"%v%v%v - %v"
,
prefix
,
name
,
usage
,
sub
.
Description
)
}
i
++
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment