提交 bc94293b 作者: rht

Merge pull request #2223 from ipfs/feature/doc-add

Generic doc fixes to `ipfs add`
...@@ -94,7 +94,7 @@ USAGE: ...@@ -94,7 +94,7 @@ USAGE:
BASIC COMMANDS BASIC COMMANDS
init Initialize ipfs local configuration init Initialize ipfs local configuration
add <path> Add an object to ipfs add <path> Add a file to ipfs
cat <ref> Show ipfs object data cat <ref> Show ipfs object data
get <ref> Download ipfs objects get <ref> Download ipfs objects
ls <ref> List links from an object ls <ref> List links from an object
......
...@@ -30,12 +30,11 @@ const ( ...@@ -30,12 +30,11 @@ const (
var AddCmd = &cmds.Command{ var AddCmd = &cmds.Command{
Helptext: cmds.HelpText{ Helptext: cmds.HelpText{
Tagline: "Add an object to ipfs.", Tagline: "Add a file to ipfs.",
ShortDescription: ` ShortDescription: `
Adds contents of <path> to ipfs. Use -r to add directories. Adds contents of <path> to ipfs. Use -r to add directories.
Note that directories are added recursively, to form the ipfs Note that directories are added recursively, to form the ipfs
MerkleDAG. A smarter partial add with a staging area (like git) MerkleDAG.
remains to be implemented.
`, `,
}, },
...@@ -44,15 +43,15 @@ remains to be implemented. ...@@ -44,15 +43,15 @@ remains to be implemented.
}, },
Options: []cmds.Option{ Options: []cmds.Option{
cmds.OptionRecursivePath, // a builtin option that allows recursive paths (-r, --recursive) cmds.OptionRecursivePath, // a builtin option that allows recursive paths (-r, --recursive)
cmds.BoolOption(quietOptionName, "q", "Write minimal output"), cmds.BoolOption(quietOptionName, "q", "Write minimal output."),
cmds.BoolOption(silentOptionName, "Write no output"), cmds.BoolOption(silentOptionName, "Write no output."),
cmds.BoolOption(progressOptionName, "p", "Stream progress data"), cmds.BoolOption(progressOptionName, "p", "Stream progress data."),
cmds.BoolOption(trickleOptionName, "t", "Use trickle-dag format for dag generation"), cmds.BoolOption(trickleOptionName, "t", "Use trickle-dag format for dag generation."),
cmds.BoolOption(onlyHashOptionName, "n", "Only chunk and hash - do not write to disk"), cmds.BoolOption(onlyHashOptionName, "n", "Only chunk and hash - do not write to disk."),
cmds.BoolOption(wrapOptionName, "w", "Wrap files with a directory object"), cmds.BoolOption(wrapOptionName, "w", "Wrap files with a directory object."),
cmds.BoolOption(hiddenOptionName, "H", "Include files that are hidden. Only takes effect on recursive add."), cmds.BoolOption(hiddenOptionName, "H", "Include files that are hidden. Only takes effect on recursive add."),
cmds.StringOption(chunkerOptionName, "s", "chunking algorithm to use"), cmds.StringOption(chunkerOptionName, "s", "Chunking algorithm to use."),
cmds.BoolOption(pinOptionName, "Pin this object when adding. Default true"), cmds.BoolOption(pinOptionName, "Pin this object when adding. Default: true."),
}, },
PreRun: func(req cmds.Request) error { PreRun: func(req cmds.Request) error {
if quiet, _, _ := req.Option(quietOptionName).Bool(); quiet { if quiet, _, _ := req.Option(quietOptionName).Bool(); quiet {
......
...@@ -32,7 +32,7 @@ ipfs [<flags>] <command> [<arg>] ... ...@@ -32,7 +32,7 @@ ipfs [<flags>] <command> [<arg>] ...
BASIC COMMANDS BASIC COMMANDS
init Initialize ipfs local configuration init Initialize ipfs local configuration
add <path> Add an object to ipfs add <path> Add a file to ipfs
cat <ref> Show ipfs object data cat <ref> Show ipfs object data
get <ref> Download ipfs objects get <ref> Download ipfs objects
ls <ref> List links from an object ls <ref> List links from an object
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论