1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-29 01:12:24 +08:00

core/command2: Make help text match old commands

This commit is contained in:
Matt Bell
2014-11-09 20:48:40 -08:00
committed by Juan Batiz-Benet
parent 3406ee0ef4
commit 2d756473f6
9 changed files with 24 additions and 15 deletions

View File

@ -24,7 +24,8 @@ type Block struct {
var blockCmd = &cmds.Command{
Description: "Manipulate raw IPFS blocks",
Help: `'ipfs block' is a plumbing command used to manipulate raw ipfs blocks.
Reads from stdin or writes to stdout.`,
Reads from stdin or writes to stdout, and <key> is a base58 encoded
multihash.`,
Subcommands: map[string]*cmds.Command{
"get": blockGetCmd,
"put": blockPutCmd,
@ -33,7 +34,8 @@ Reads from stdin or writes to stdout.`,
var blockGetCmd = &cmds.Command{
Description: "Get a raw IPFS block",
Help: `'ipfs block get' is a plumbing command for retreiving raw ipfs blocks.`,
Help: `ipfs block get is a plumbing command for retreiving raw ipfs blocks.
It outputs to stdout, and <key> is a base58 encoded multihash.`,
Arguments: []cmds.Argument{
cmds.Argument{"key", cmds.ArgString, true, false, "The base58 multihash of an existing block to get"},
@ -72,8 +74,8 @@ var blockGetCmd = &cmds.Command{
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 outputs the key of the stored 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.`,
Arguments: []cmds.Argument{
cmds.Argument{"data", cmds.ArgFile, true, false, "The data to be stored as an IPFS block"},

View File

@ -120,7 +120,7 @@ var bootstrapRemoveCmd = &cmds.Command{
}
var bootstrapListCmd = &cmds.Command{
Description: "Lists peers in the bootstrap list",
Description: "Show peers in the bootstrap list",
Help: `Peers are output in the format '<multiaddr>/<peerID>'.
`,

View File

@ -25,7 +25,9 @@ type LsOutput struct {
var lsCmd = &cmds.Command{
Description: "List links from an object.",
Help: `Retrieves the object named by <ipfs-path> and displays the links
it contains.
it contains, with the following format:
<link base58 hash> <link size in bytes> <link name>
`,
Arguments: []cmds.Argument{
@ -70,6 +72,7 @@ it contains.
},
Marshallers: map[cmds.EncodingType]cmds.Marshaller{
cmds.Text: func(res cmds.Response) ([]byte, error) {
// TODO: revert format to match old command
s := ""
output := res.Output().(*LsOutput).Objects

View File

@ -20,8 +20,8 @@ var pinCmd = &cmds.Command{
var addPinCmd = &cmds.Command{
Description: "Pins objects to local storage",
Help: `Keeps the object(s) named by <ipfs-path> in local storage. If the object
isn't already being stored, IPFS retrieves it.
Help: `Retrieves the object named by <ipfs-path> and stores it locally
on disk.
`,
Arguments: []cmds.Argument{

View File

@ -16,7 +16,8 @@ var errNotOnline = errors.New("This command must be run in online mode. Try runn
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
the private key enables publishing new (signed) values.
the private key enables publishing new (signed) values. In publish, the
default value of <name> is your own identity public key.
Examples:

View File

@ -20,7 +20,9 @@ var refsCmd = &cmds.Command{
Help: `Retrieves the object named by <ipfs-path> and displays the link
hashes it contains, with the following format:
<link base58 hash>`,
<link base58 hash>
Note: list all refs recursively with -r.`,
Arguments: []cmds.Argument{
cmds.Argument{"ipfs-path", cmds.ArgString, true, true,

View File

@ -14,7 +14,8 @@ type ResolveOutput struct {
var resolveCmd = &cmds.Command{
Description: "Gets the value currently published at an IPNS name",
Help: `IPNS is a PKI namespace, where names are the hashes of public keys, and
the private key enables publishing new (signed) values.
the private key enables publishing new (signed) values. In resolve, the
default value of <name> is your own identity public key.
Examples:

View File

@ -13,7 +13,7 @@ type VersionOutput struct {
var versionCmd = &cmds.Command{
Description: "Outputs the current version of IPFS",
Help: `Returns the version number of IPFS.
Help: `Returns the version number of IPFS and exits.
`,
Options: []cmds.Option{