From af148b3e0570e0d702bfd220f14adbb485d4d01a Mon Sep 17 00:00:00 2001 From: Richard Littauer Date: Thu, 4 Feb 2016 17:20:57 -0500 Subject: [PATCH] Normalised Example heading, added dollar sign to examples License: MIT Signed-off-by: Richard Littauer --- core/commands/config.go | 6 +++--- core/commands/mount_unix.go | 2 +- core/commands/object/object.go | 6 +++--- core/commands/object/patch.go | 13 +++++++------ 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/core/commands/config.go b/core/commands/config.go index 798a0b2a1..1bbe2225b 100644 --- a/core/commands/config.go +++ b/core/commands/config.go @@ -41,15 +41,15 @@ repository.`, much like 'git config'. The configuration values are stored in a config file inside your IPFS repository. -EXAMPLES: +Examples: Get the value of the 'datastore.path' key: - ipfs config datastore.path + $ ipfs config datastore.path Set the value of the 'datastore.path' key: - ipfs config datastore.path ~/.ipfs/datastore + $ ipfs config datastore.path ~/.ipfs/datastore `, }, diff --git a/core/commands/mount_unix.go b/core/commands/mount_unix.go index 27e1fd0d2..fbcd99b45 100644 --- a/core/commands/mount_unix.go +++ b/core/commands/mount_unix.go @@ -43,7 +43,7 @@ You may have to create /ipfs and /ipns before using 'ipfs mount': > ipfs daemon & > ipfs mount -EXAMPLE: +Example: # setup > mkdir foo diff --git a/core/commands/object/object.go b/core/commands/object/object.go index 5705d1aec..3e46803aa 100644 --- a/core/commands/object/object.go +++ b/core/commands/object/object.go @@ -305,7 +305,7 @@ Data should be in the format specified by the --inputenc flag. Examples: - echo '{ "Data": "abc" }' | ipfs object put + $ echo '{ "Data": "abc" }' | ipfs object put This creates a node with the data "abc" and no links. For an object with links, create a file named node.json with the contents: @@ -319,9 +319,9 @@ create a file named node.json with the contents: } ] } -and then run +And then run: - ipfs object put node.json + $ ipfs object put node.json `, }, diff --git a/core/commands/object/patch.go b/core/commands/object/patch.go index df9933fe5..5308b63dc 100644 --- a/core/commands/object/patch.go +++ b/core/commands/object/patch.go @@ -48,7 +48,8 @@ var patchAppendDataCmd = &cmds.Command{ ShortDescription: ` Append data to what already exists in the data segment in the given object. -EXAMPLE: +Example: + $ echo "hello" | ipfs object patch $HASH append-data note: this does not append data to a 'file', it modifies the actual raw @@ -113,7 +114,7 @@ var patchSetDataCmd = &cmds.Command{ ShortDescription: ` Set the data of an ipfs object from stdin or with the contents of a file -EXAMPLE: +Example: $ echo "my data" | ipfs object patch $MYHASH set-data `, @@ -235,11 +236,11 @@ var patchAddLinkCmd = &cmds.Command{ ShortDescription: ` Add a merkle-link to the given object and return the hash of the result. -Examples: +Example: - EMPTY_DIR=$(ipfs object new unixfs-dir) - BAR=$(echo "bar" | ipfs add -q) - ipfs object patch $EMPTY_DIR add-link foo $BAR + $ EMPTY_DIR=$(ipfs object new unixfs-dir) + $ BAR=$(echo "bar" | ipfs add -q) + $ ipfs object patch $EMPTY_DIR add-link foo $BAR This takes an empty directory, and adds a link named foo under it, pointing to a file containing 'bar', and returns the hash of the new object.