Skip to content

Commit

Permalink
core/commands: Enable stdin arguments for 'add' and 'cat', resolves #542
Browse files Browse the repository at this point in the history
  • Loading branch information
mappum committed Jan 14, 2015
1 parent 325cc37 commit 9f3d4d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ remains to be implemented.
},

Arguments: []cmds.Argument{
cmds.FileArg("path", true, true, "The path to a file to be added to IPFS").EnableRecursive(),
cmds.FileArg("path", true, true, "The path to a file to be added to IPFS").EnableRecursive().EnableStdin(),
},
Options: []cmds.Option{
cmds.OptionRecursivePath, // a builtin option that allows recursive paths (-r, --recursive)
Expand Down
2 changes: 1 addition & 1 deletion core/commands/cat.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ it contains.
},

Arguments: []cmds.Argument{
cmds.StringArg("ipfs-path", true, true, "The path to the IPFS object(s) to be outputted"),
cmds.StringArg("ipfs-path", true, true, "The path to the IPFS object(s) to be outputted").EnableStdin(),
},
Run: func(req cmds.Request) (interface{}, error) {
node, err := req.Context().GetNode()
Expand Down

0 comments on commit 9f3d4d3

Please sign in to comment.