@cryptotaxi247 / kubo / commits / 70adc21d0

core/commands: Enable stdin arguments for 'add' and 'cat', resolves #542

Matt Bell committed Jan 12, 2015 at 11:32 UTC 70adc21d08bc304b02c89e5b0f9a61dbe0a0372c
2 files changed +2 -2
core/commands/add.go
+1 -1
@@ -37,7 +37,7 @@ remains to be implemented.
37 },
38
39 Arguments: []cmds.Argument{
40 - cmds.FileArg("path", true, true, "The path to a file to be added to IPFS").EnableRecursive(),
40 + cmds.FileArg("path", true, true, "The path to a file to be added to IPFS").EnableRecursive().EnableStdin(),
41 },
42 Options: []cmds.Option{
43 cmds.OptionRecursivePath, // a builtin option that allows recursive paths (-r, --recursive)
core/commands/cat.go
+1 -1
@@ -18,7 +18,7 @@ it contains.
18 },
19
20 Arguments: []cmds.Argument{
21 - cmds.StringArg("ipfs-path", true, true, "The path to the IPFS object(s) to be outputted"),
21 + cmds.StringArg("ipfs-path", true, true, "The path to the IPFS object(s) to be outputted").EnableStdin(),
22 },
23 Run: func(req cmds.Request) (interface{}, error) {
24 node, err := req.Context().GetNode()