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-dms3
Commits
e23b537f
Commit
e23b537f
authored
Nov 11, 2014
by
Matt Bell
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Override root command help text
parent
7666f888
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
cmd/ipfs2/main.go
cmd/ipfs2/main.go
+1
-4
core/commands2/root.go
core/commands2/root.go
+1
-1
No files found.
cmd/ipfs2/main.go
View file @
e23b537f
...
...
@@ -102,11 +102,8 @@ func createRequest(args []string) (cmds.Request, *cmds.Command, error) {
}
}
// when generating help for the root command, we don't want the autogenerated subcommand text
// (since we have better hand-made subcommand list in the root Help field)
if
cmd
==
nil
{
root
=
&*
commands
.
Root
root
.
Subcommands
=
nil
root
=
commands
.
Root
}
// generate the help text for the command the user was trying to call (or root)
...
...
core/commands2/root.go
View file @
e23b537f
...
...
@@ -14,7 +14,7 @@ type TestOutput struct {
var
Root
=
&
cmds
.
Command
{
Description
:
"Global P2P Merkle-DAG filesystem"
,
Help
:
`Basic commands:
Subcommand
Help
:
`Basic commands:
init Initialize ipfs local configurationx
add <path> Add an object to ipfs
...
...
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