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:

committed by
Juan Batiz-Benet

parent
7666f8880c
commit
e23b537f32
@ -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)
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user