Commit 063cb536 authored by Matt Bell's avatar Matt Bell Committed by Juan Batiz-Benet

cmd/ipfs: Display help text when help flag is set

parent 8edfee2a
......@@ -50,6 +50,11 @@ func main() {
os.Exit(1)
}
if help, found := options.Option("help"); found && help.(bool) {
fmt.Println(cmd.Help)
os.Exit(0)
}
if debug, found := options.Option("debug"); found && debug.(bool) {
u.Debug = true
......
......@@ -15,6 +15,7 @@ var Root = &cmds.Command{
Options: []cmds.Option{
cmds.Option{[]string{"config", "c"}, cmds.String},
cmds.Option{[]string{"debug", "D"}, cmds.Bool},
cmds.Option{[]string{"help", "h"}, cmds.Bool},
},
Help: `ipfs - global versioned p2p merkledag file system
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment