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

Ported remaining command helptext to HelpText struct

parent 6597a5f7
......@@ -15,8 +15,11 @@ import (
)
var daemonCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "run a network-connected ipfs node", // TODO adjust copy
},
Options: []cmds.Option{},
Help: "run a network-connected ipfs node", // TODO adjust copy
Subcommands: map[string]*cmds.Command{},
Run: daemonFunc,
}
......
......@@ -15,9 +15,10 @@ import (
)
var initCmd = &cmds.Command{
Description: "Initializes IPFS config file",
Help: `Initializes IPFS configuration files and generates a new keypair.
`,
Helptext: cmds.HelpText{
Tagline: "Initializes IPFS config file",
ShortDescription: "Initializes IPFS configuration files and generates a new keypair.",
},
Options: []cmds.Option{
cmds.IntOption("bits", "b", "Number of bits to use in the generated RSA private key (defaults to 4096)"),
......
......@@ -60,7 +60,9 @@ IPFS very quickly. To start, run:
}
var cmdIpfsTourNext = &cmds.Command{
Description: "Show the next IPFS Tour topic",
Helptext: cmds.HelpText{
Tagline: "Show the next IPFS Tour topic",
},
Run: func(req cmds.Request) (interface{}, error) {
var w bytes.Buffer
......@@ -90,7 +92,9 @@ var cmdIpfsTourNext = &cmds.Command{
}
var cmdIpfsTourRestart = &cmds.Command{
Description: "Restart the IPFS Tour",
Helptext: cmds.HelpText{
Tagline: "Restart the IPFS Tour",
},
Run: func(req cmds.Request) (interface{}, error) {
path := req.Context().ConfigRoot
......@@ -109,7 +113,9 @@ var cmdIpfsTourRestart = &cmds.Command{
}
var cmdIpfsTourList = &cmds.Command{
Description: "Show a list of IPFS Tour topics",
Helptext: cmds.HelpText{
Tagline: "Show a list of IPFS Tour topics",
},
Run: func(req cmds.Request) (interface{}, error) {
cfg, err := req.Context().GetConfig()
......
......@@ -80,9 +80,13 @@ It outputs to stdout, and <key> is a base58 encoded multihash.
}
var blockPutCmd = &cmds.Command{
Description: "Stores input as an IPFS block",
Help: `ipfs block put is a plumbing command for storing raw ipfs blocks.
It reads from stdin, and <key> is a base58 encoded multihash.`,
Helptext: cmds.HelpText{
Tagline: "Stores input as an IPFS block",
ShortDescription: `
ipfs block put is a plumbing command for storing raw ipfs blocks.
It reads from stdin, and <key> is a base58 encoded multihash.
`,
},
Arguments: []cmds.Argument{
cmds.FileArg("data", true, false, "The data to be stored as an IPFS block"),
......
......@@ -116,10 +116,13 @@ Set the value of the 'datastore.path' key:
}
var configShowCmd = &cmds.Command{
Description: "Outputs the content of the config file",
Help: `WARNING: Your private key is stored in the config file, and it will be
Helptext: cmds.HelpText{
Tagline: "Outputs the content of the config file",
ShortDescription: `
WARNING: Your private key is stored in the config file, and it will be
included in the output of this command.
`,
},
Run: func(req cmds.Request) (interface{}, error) {
filename, err := config.Filename(req.Context().ConfigRoot)
......@@ -132,10 +135,13 @@ included in the output of this command.
}
var configEditCmd = &cmds.Command{
Description: "Opens the config file for editing in $EDITOR",
Help: `To use 'ipfs config edit', you must have the $EDITOR environment
Helptext: cmds.HelpText{
Tagline: "Opens the config file for editing in $EDITOR",
ShortDescription: `
To use 'ipfs config edit', you must have the $EDITOR environment
variable set to your preferred text editor.
`,
},
Run: func(req cmds.Request) (interface{}, error) {
filename, err := config.Filename(req.Context().ConfigRoot)
......
......@@ -29,7 +29,9 @@ type DiagnosticOutput struct {
}
var diagCmd = &cmds.Command{
Description: "Generates diagnostic reports",
Helptext: cmds.HelpText{
Tagline: "Generates diagnostic reports",
},
Subcommands: map[string]*cmds.Command{
"net": diagNetCmd,
......
......@@ -10,7 +10,9 @@ import (
)
var pinCmd = &cmds.Command{
Description: "Keeps objects stored locally",
Helptext: cmds.HelpText{
Tagline: "Keeps objects stored locally",
},
Subcommands: map[string]*cmds.Command{
"add": addPinCmd,
......
......@@ -14,8 +14,15 @@ import (
var errNotOnline = errors.New("This command must be run in online mode. Try running 'ipfs daemon' first.")
var publishCmd = &cmds.Command{
Description: "Publish an object to IPNS",
Help: `IPNS is a PKI namespace, where names are the hashes of public keys, and
Helptext: cmds.HelpText{
Tagline: "Publish an object to IPNS",
ShortDescription: `
IPNS is a PKI namespace, where names are the hashes of public keys, and
the private key enables publishing new (signed) values. In publish, the
default value of <name> is your own identity public key.
`,
LongDescription: `
IPNS is a PKI namespace, where names are the hashes of public keys, and
the private key enables publishing new (signed) values. In publish, the
default value of <name> is your own identity public key.
......@@ -30,8 +37,8 @@ Publish a <ref> to another public key:
> ipfs name publish QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy
published name QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n to QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy
`,
},
Arguments: []cmds.Argument{
cmds.StringArg("name", false, false, "The IPNS name to publish to. Defaults to your node's peerID"),
......
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