@cryptotaxi247 / kubo / commits / 0aad34230

Improve command documentation for listing commands (Fixes #3057).

* Document deprecation of 'ipfs file' in command help. * Be explicit about 'ipfs ls' listing unixfs and suplying type in JSON. * Amend description for 'ipfs files ls'. License: MIT Signed-off-by: Mathijs de Bruin <mathijs@mathijsfietst.nl>

Mathijs de Bruin committed Aug 13, 2016 at 09:56 UTC 0aad34230641cc0ae068345e0eab88ec1291c309
3 files changed +13 -5
core/commands/files/files.go
+2 -2
@@ -284,9 +284,9 @@ type FilesLsOutput struct {
284
285 var FilesLsCmd = &cmds.Command{
286 Helptext: cmds.HelpText{
287 - Tagline: "List directories.",
287 + Tagline: "List directories in the local mutable namespace.",
288 ShortDescription: `
289 -List directories.
289 +List directories in the local mutable namespace.
290
291 Examples:
292
core/commands/ls.go
+5 -3
@@ -32,12 +32,14 @@ type LsOutput struct {
32
33 var LsCmd = &cmds.Command{
34 Helptext: cmds.HelpText{
35 - Tagline: "List links from an object.",
35 + Tagline: "List directory contents for Unix filesystem objects.",
36 ShortDescription: `
37 -Displays the links an IPFS or IPNS object(s) contains, with the following
38 -format:
37 +Displays the contents of an IPFS or IPNS object(s) at the given path, with
38 +the following format:
39
40 <link base58 hash> <link size in bytes> <link name>
41 +
42 +The JSON output contains type information.
43 `,
44 },
45
core/commands/unixfs/ls.go
+6
@@ -42,6 +42,9 @@ Displays the contents of an IPFS or IPNS object(s) at the given path.
42 The JSON output contains size information. For files, the child size
43 is the total size of the file contents. For directories, the child
44 size is the IPFS link size.
45 +
46 +This functionality is deprecated, and will be removed in future versions. If
47 +possible, please use 'ipfs ls' instead.
48 `,
49 LongDescription: `
50 Displays the contents of an IPFS or IPNS object(s) at the given path.
@@ -59,6 +62,9 @@ Example:
62 cat.jpg
63 > ipfs file ls /ipfs/QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ
64 cat.jpg
65 +
66 +This functionality is deprecated, and will be removed in future versions. If
67 +possible, please use 'ipfs ls' instead.
68 `,
69 },
70