@cryptotaxi247 / kubo / commits / e23b537f3

Override root command help text

Matt Bell committed Nov 11, 2014 at 19:09 UTC e23b537f3270f33118759826c8eb27ab3a6de0a0
2 files changed +2 -5
cmd/ipfs2/main.go
+1 -4
@@ -102,11 +102,8 @@ func createRequest(args []string) (cmds.Request, *cmds.Command, error) {
102 }
103 }
104
105 - // when generating help for the root command, we don't want the autogenerated subcommand text
106 - // (since we have better hand-made subcommand list in the root Help field)
105 if cmd == nil {
108 - root = &*commands.Root
109 - root.Subcommands = nil
106 + root = commands.Root
107 }
108
109 // generate the help text for the command the user was trying to call (or root)
core/commands2/root.go
+1 -1
@@ -14,7 +14,7 @@ type TestOutput struct {
14
15 var Root = &cmds.Command{
16 Description: "Global P2P Merkle-DAG filesystem",
17 - Help: `Basic commands:
17 + SubcommandHelp: `Basic commands:
18
19 init Initialize ipfs local configurationx
20 add <path> Add an object to ipfs