@cryptotaxi247 / kubo / commits / b5aaf75e2

Fix #4996: Improve help text for "ipfs files cp"

Hector Sanjuan committed Apr 1, 2020 at 12:08 UTC b5aaf75e2501c504eb7527972d08a52fb2f27a3b
1 file changed +17 -1
core/commands/files.go
+17 -1
@@ -321,7 +321,23 @@ func walkBlock(ctx context.Context, dagserv ipld.DAGService, nd ipld.Node) (bool
321
322 var filesCpCmd = &cmds.Command{
323 Helptext: cmds.HelpText{
324 - Tagline: "Copy files into mfs.",
324 + Tagline: "Copy any IPFS objects into mfs (or copy within MFS).",
325 + ShortDescription: `
326 +"ipfs files cp" can be used to copy any IPFS object (usually in the form
327 +/ipfs/<CID>, but also any resolvable path), into the Mutable File System
328 +(MFS).
329 +
330 +It can also be used to copy files within MFS, but in the case when an
331 +IPFS-path matches an existing MFS path, the IPFS path wins.
332 +
333 +In order to add content to MFS from disk, you can use "ipfs add" to obtain the
334 +IPFS Content Identifier and then "ipfs files cp" to copy it into MFS:
335 +
336 +$ ipfs add --pin=false <your file>
337 +# ...
338 +# ... outputs the root CID at the end
339 +$ ipfs cp /ipfs/<CID> /your/desired/mfs/path
340 +`,
341 },
342 Arguments: []cmds.Argument{
343 cmds.StringArg("source", true, false, "Source object to copy."),