Skip to content

Commit

Permalink
Merge pull request #2223 from ipfs/feature/doc-add
Browse files Browse the repository at this point in the history
Generic doc fixes to `ipfs add`
  • Loading branch information
rht committed Jan 23, 2016
2 parents a2b0287 + 7a7a21b commit bc94293
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ USAGE:
BASIC COMMANDS
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
get <ref> Download ipfs objects
ls <ref> List links from an object
Expand Down
21 changes: 10 additions & 11 deletions core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ const (

var AddCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Add an object to ipfs.",
Tagline: "Add a file to ipfs.",
ShortDescription: `
Adds contents of <path> to ipfs. Use -r to add directories.
Note that directories are added recursively, to form the ipfs
MerkleDAG. A smarter partial add with a staging area (like git)
remains to be implemented.
MerkleDAG.
`,
},

Expand All @@ -44,15 +43,15 @@ remains to be implemented.
},
Options: []cmds.Option{
cmds.OptionRecursivePath, // a builtin option that allows recursive paths (-r, --recursive)
cmds.BoolOption(quietOptionName, "q", "Write minimal output"),
cmds.BoolOption(silentOptionName, "Write no output"),
cmds.BoolOption(progressOptionName, "p", "Stream progress data"),
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(wrapOptionName, "w", "Wrap files with a directory object"),
cmds.BoolOption(quietOptionName, "q", "Write minimal output."),
cmds.BoolOption(silentOptionName, "Write no output."),
cmds.BoolOption(progressOptionName, "p", "Stream progress data."),
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(wrapOptionName, "w", "Wrap files with a directory object."),
cmds.BoolOption(hiddenOptionName, "H", "Include files that are hidden. Only takes effect on recursive add."),
cmds.StringOption(chunkerOptionName, "s", "chunking algorithm to use"),
cmds.BoolOption(pinOptionName, "Pin this object when adding. Default true"),
cmds.StringOption(chunkerOptionName, "s", "Chunking algorithm to use."),
cmds.BoolOption(pinOptionName, "Pin this object when adding. Default: true."),
},
PreRun: func(req cmds.Request) error {
if quiet, _, _ := req.Option(quietOptionName).Bool(); quiet {
Expand Down
2 changes: 1 addition & 1 deletion core/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ipfs [<flags>] <command> [<arg>] ...
BASIC COMMANDS
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
get <ref> Download ipfs objects
ls <ref> List links from an object
Expand Down

0 comments on commit bc94293

Please sign in to comment.