1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 17:03:58 +08:00

Override root command help text

This commit is contained in:
Matt Bell
2014-11-11 19:09:25 -08:00
committed by Juan Batiz-Benet
parent 7666f8880c
commit e23b537f32
2 changed files with 2 additions and 5 deletions

View File

@ -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)

View File

@ -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 <path> Add an object to ipfs