From e23b537f3270f33118759826c8eb27ab3a6de0a0 Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Tue, 11 Nov 2014 19:09:25 -0800 Subject: [PATCH] Override root command help text --- cmd/ipfs2/main.go | 5 +---- core/commands2/root.go | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cmd/ipfs2/main.go b/cmd/ipfs2/main.go index b6a15be3b..4d6421416 100644 --- a/cmd/ipfs2/main.go +++ b/cmd/ipfs2/main.go @@ -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) diff --git a/core/commands2/root.go b/core/commands2/root.go index 187592ceb..5d22c5fab 100644 --- a/core/commands2/root.go +++ b/core/commands2/root.go @@ -14,7 +14,7 @@ type TestOutput struct { var Root = &cmds.Command{ Description: "Global P2P Merkle-DAG filesystem", - Help: `Basic commands: + SubcommandHelp: `Basic commands: init Initialize ipfs local configurationx add Add an object to ipfs