提交 e23b537f 作者: Matt Bell 提交者: Juan Batiz-Benet

Override root command help text

上级 7666f888
......@@ -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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论