core/command2: Make help text match old commands
Matt Bell committed
Nov 9, 2014 at 20:48 UTC
2d756473f6c24d16f41ff5ed6393901f4f6ecbaf
9 files changed
+24
-15
core/commands2/block.go
+6
-4
@@ -24,7 +24,8 @@ type Block struct {
24
var blockCmd = &cmds.Command{
25
Description: "Manipulate raw IPFS blocks",
26
Help: `'ipfs block' is a plumbing command used to manipulate raw ipfs blocks.
27
-Reads from stdin or writes to stdout.`,
27
+Reads from stdin or writes to stdout, and <key> is a base58 encoded
28
+multihash.`,
29
Subcommands: map[string]*cmds.Command{
30
"get": blockGetCmd,
31
"put": blockPutCmd,
@@ -33,7 +34,8 @@ Reads from stdin or writes to stdout.`,
34
35
var blockGetCmd = &cmds.Command{
36
Description: "Get a raw IPFS block",
36
- Help: `'ipfs block get' is a plumbing command for retreiving raw ipfs blocks.`,
37
+ Help: `ipfs block get is a plumbing command for retreiving raw ipfs blocks.
38
+It outputs to stdout, and <key> is a base58 encoded multihash.`,
39
40
Arguments: []cmds.Argument{
41
cmds.Argument{"key", cmds.ArgString, true, false, "The base58 multihash of an existing block to get"},
@@ -72,8 +74,8 @@ var blockGetCmd = &cmds.Command{
74
75
var blockPutCmd = &cmds.Command{
76
Description: "Stores input as an IPFS block",
75
- Help: `'ipfs block put' is a plumbing command for storing raw ipfs blocks.
76
-It outputs the key of the stored block.`,
77
+ Help: `ipfs block put is a plumbing command for storing raw ipfs blocks.
78
+It reads from stdin, and <key> is a base58 encoded multihash.`,
79
80
Arguments: []cmds.Argument{
81
cmds.Argument{"data", cmds.ArgFile, true, false, "The data to be stored as an IPFS block"},
core/commands2/bootstrap.go
+1
-1
@@ -120,7 +120,7 @@ var bootstrapRemoveCmd = &cmds.Command{
120
}
121
122
var bootstrapListCmd = &cmds.Command{
123
- Description: "Lists peers in the bootstrap list",
123
+ Description: "Show peers in the bootstrap list",
124
Help: `Peers are output in the format '<multiaddr>/<peerID>'.
125
`,
126
core/commands2/cat.go
+1
-1
@@ -12,7 +12,7 @@ import (
12
var catCmd = &cmds.Command{
13
Description: "Show IPFS object data",
14
Help: `Retrieves the object named by <ipfs-path> and outputs the data
15
- it contains.
15
+it contains.
16
`,
17
18
Arguments: []cmds.Argument{
core/commands2/ls.go
+4
-1
@@ -25,7 +25,9 @@ type LsOutput struct {
25
var lsCmd = &cmds.Command{
26
Description: "List links from an object.",
27
Help: `Retrieves the object named by <ipfs-path> and displays the links
28
-it contains.
28
+it contains, with the following format:
29
+
30
+ <link base58 hash> <link size in bytes> <link name>
31
`,
32
33
Arguments: []cmds.Argument{
@@ -70,6 +72,7 @@ it contains.
72
},
73
Marshallers: map[cmds.EncodingType]cmds.Marshaller{
74
cmds.Text: func(res cmds.Response) ([]byte, error) {
75
+ // TODO: revert format to match old command
76
s := ""
77
output := res.Output().(*LsOutput).Objects
78
core/commands2/pin.go
+3
-3
@@ -20,8 +20,8 @@ var pinCmd = &cmds.Command{
20
21
var addPinCmd = &cmds.Command{
22
Description: "Pins objects to local storage",
23
- Help: `Keeps the object(s) named by <ipfs-path> in local storage. If the object
24
-isn't already being stored, IPFS retrieves it.
23
+ Help: `Retrieves the object named by <ipfs-path> and stores it locally
24
+on disk.
25
`,
26
27
Arguments: []cmds.Argument{
@@ -57,7 +57,7 @@ isn't already being stored, IPFS retrieves it.
57
var rmPinCmd = &cmds.Command{
58
Description: "Unpin an object from local storage",
59
Help: `Removes the pin from the given object allowing it to be garbage
60
- collected if needed.
60
+collected if needed.
61
`,
62
63
Arguments: []cmds.Argument{
core/commands2/publish.go
+2
-1
@@ -16,7 +16,8 @@ var errNotOnline = errors.New("This command must be run in online mode. Try runn
16
var publishCmd = &cmds.Command{
17
Description: "Publish an object to IPNS",
18
Help: `IPNS is a PKI namespace, where names are the hashes of public keys, and
19
-the private key enables publishing new (signed) values.
19
+the private key enables publishing new (signed) values. In publish, the
20
+default value of <name> is your own identity public key.
21
22
Examples:
23
core/commands2/refs.go
+4
-2
@@ -18,9 +18,11 @@ type RefsOutput struct {
18
var refsCmd = &cmds.Command{
19
Description: "Lists link hashes from an object",
20
Help: `Retrieves the object named by <ipfs-path> and displays the link
21
- hashes it contains, with the following format:
21
+hashes it contains, with the following format:
22
23
- <link base58 hash>`,
23
+ <link base58 hash>
24
+
25
+Note: list all refs recursively with -r.`,
26
27
Arguments: []cmds.Argument{
28
cmds.Argument{"ipfs-path", cmds.ArgString, true, true,
core/commands2/resolve.go
+2
-1
@@ -14,7 +14,8 @@ type ResolveOutput struct {
14
var resolveCmd = &cmds.Command{
15
Description: "Gets the value currently published at an IPNS name",
16
Help: `IPNS is a PKI namespace, where names are the hashes of public keys, and
17
-the private key enables publishing new (signed) values.
17
+the private key enables publishing new (signed) values. In resolve, the
18
+default value of <name> is your own identity public key.
19
20
21
Examples:
core/commands2/version.go
+1
-1
@@ -13,7 +13,7 @@ type VersionOutput struct {
13
14
var versionCmd = &cmds.Command{
15
Description: "Outputs the current version of IPFS",
16
- Help: `Returns the version number of IPFS.
16
+ Help: `Returns the version number of IPFS and exits.
17
`,
18
19
Options: []cmds.Option{