on master help sign in
fix #42 "aspirational" argument structure, examples
8579bb8Anton Dyudin
docs/using/filesystem.md+17−25
@@ -108,28 +108,27 @@ Unmounts the path `%/web` from whatever name it was mounted as.
108
108
109Unmounts the Unix path `/generators`.
109Unmounts the Unix path `/generators`.
110
110
111−### `|merge desk beak [strategy]`
111+### `|merge desk beak[, =gem strategy]`
112
112
113Merges a `beak` into a `desk` using an optional merge `strategy`.
113Merges a `beak` into a `desk` using an optional merge `strategy`.
114
114
115−A `beak` is either a desk (`%home`), a plot-desk cell (`[~doznec
116−%home]`), or a plot-desk-case (`/~doznec/home/2/web/md`)
115+A `beak` is a ship-desk-case triple, encoded as a path(`/~doznec/home/2`)
117
116
118**Examples:**
117**Examples:**
119
118
120− |merge %home-work /=home= %fine
119+ |merge %home-work /=home=, =gem %fine
121
120
122Merge `/=home=` into `%home-work` using merge strategy `%fine`.
121Merge `/=home=` into `%home-work` using merge strategy `%fine`.
123
122
124− |merge %examples [~wacbex-ribmex %examples]
123+ |merge %examples ~wacbex-ribmex %examples
125
124
126Merge the `%examples` desk from `~waxbex-ribmex`
125Merge the `%examples` desk from `~waxbex-ribmex`
127
126
128### `|sync desk plot [plot-desk]`
127### `|sync desk plot [plot-desk]`
129
128
130Subscribe to continuous updates from remote `plot` on local `desk`.
129Subscribe to continuous updates from remote `plot` on local `desk`.
131−`plot-desk` can specify the remote `desk` name. When omitted it's
130+`plot-desk` can specify the remote `desk` name. When omitted it is
132−assumed to be the same as `desk`. Moons have `|sync %home ~parent
131+defaulted to being the same as `desk`. Ships have `|sync %home ~parent
133%kids` automatically set up (where `~parent` is the planet that issued
132%kids` automatically set up (where `~parent` is the planet that issued
134the moon).
133the moon).
135
134
@@ -140,8 +139,7 @@ the moon).
140### `|unsync desk plot [plot-desk]`
139### `|unsync desk plot [plot-desk]`
141
140
142Unsubscribe from updates from remote `plot` on local `desk` with
141Unsubscribe from updates from remote `plot` on local `desk` with
143−optional `plot-desk`. Arguments must match original `|sync` command
142+optional `plot-desk`. Arguments must match original `|sync` command.
144−exactly.
145
143
146Example:
144Example:
147
145
@@ -160,7 +158,7 @@ Example:
160`%init` - Used if it's the first commit to a desk. Also can be
158`%init` - Used if it's the first commit to a desk. Also can be
161used to "reinitialize" a desk -- revision numbers keep going up,
159used to "reinitialize" a desk -- revision numbers keep going up,
162but the new revision isn't necessarily a descendent of the
160but the new revision isn't necessarily a descendent of the
163−previously-numbered version.
161+previously-numbered version, allowing merges to be rerun.
164
162
165`%this` - Keep what's in Bob's desk, but join the ancestry.
163`%this` - Keep what's in Bob's desk, but join the ancestry.
166
164
@@ -209,32 +207,26 @@ Finally, we annotate any conflicts, if we know how.
209Remove the data at `path`. `path` must be a path to actual node, not
207Remove the data at `path`. `path` must be a path to actual node, not
210a 'directory'
208a 'directory'
211
209
212−### `|cp to from how`
210+### `|cp to from`
213
211
214−Copy the subtree `from` into the subtree `to`, committing it with the
212+Copy the file at `from` into the path `to`.
215−specified merge strategy `how`.
216
213
217−#### `|mv to from how`
214+#### `|mv to from`
218
215
219−Move the subtree `from` into the subtree `to`, committing it with the
216+Move the file at `from` into the path `to`.
220−specified merge strategy `how`.
221
217
222In `%clay`, `|mv` is just a shorthand for `|cp` then `|rm`. The `|rm`
218In `%clay`, `|mv` is just a shorthand for `|cp` then `|rm`. The `|rm`
223doesn't happen unless the `|cp` succeeds.
219doesn't happen unless the `|cp` succeeds.
224
220
225### Generators
221### Generators
226
222
227−<h3 class="first child"><code>+cat path</code> / <code>+cal [path
223+<h3 class="first child"><code>+cat path [path ...]</code></h3>
228−...]</code></h3>
229
224
230−Similar to Unix `cat`. `+cat` takes a single `path`, `+cal` a list of
225+Similar to Unix `cat`. `+cat` takes one or more `path`s, and prints
231−paths.
226+their contents.
232
227
233−Produces the contents of the file at the given `path`.
228+### `+ls path`
234
229
235−### `+ls path` / `+ll [path ...]`
236−
237−Similar to Unix `ls`. `+ls` takes a single `path`, `+ll` a list of
230+Similar to Unix `ls`. `+ls` takes a single `path`.
238−paths.
239
231
240Produces a list of names at the `path`.
232Produces a list of names at the `path`.
docs/using/shell.md+12−6
@@ -28,7 +28,7 @@ Evaluate a hoon expression:
28Tall form Hoon may require multiple lines:
28Tall form Hoon may require multiple lines:
29
29
30 ~your-urbit:dojo> %+ add
30 ~your-urbit:dojo> %+ add
31− ~your-urbit:dojo< 2
31+ ~your-urbit:dojo< 2
32 ~your-urbit:dojo< 2
32 ~your-urbit:dojo< 2
33
33
34Use `=var` to save a shell variable:
34Use `=var` to save a shell variable:
@@ -74,6 +74,8 @@ Run system commands from `:hood`, like `reload`, using `|`:
74
74
75**`+moon`** - Generate a random moon from a planet. No arguments.
75**`+moon`** - Generate a random moon from a planet. No arguments.
76
76
77+ ~your-urbit:dojo> +moon
78+
77**`+solid`** - Compile the current state of the kernel and output a noun. Usually downloaded to a file in unix. No arguments.
79**`+solid`** - Compile the current state of the kernel and output a noun. Usually downloaded to a file in unix. No arguments.
78
80
79 ~your-urbit:dojo> .urbit/pill +solid
81 ~your-urbit:dojo> .urbit/pill +solid
@@ -100,11 +102,15 @@ The hood is the system daemon. See `gen/hood` and `app/hood`.
100
102
101**`|mass`** - Prints the current memory usage of all the kernel modules. No arguments.
103**`|mass`** - Prints the current memory usage of all the kernel modules. No arguments.
102
104
105+ ~your-urbit:dojo> |mass
106+
103**`|reload`** - Reloads a kernel module (vane) from source. Accepts any number of vane names.
107**`|reload`** - Reloads a kernel module (vane) from source. Accepts any number of vane names.
104
108
105 ~your-urbit:dojo> |reload %clay %eyre
109 ~your-urbit:dojo> |reload %clay %eyre
106
110
107−**`|reset`** - Reloads `hoon.hoon`. No arguments.
111+**`|reset`** - Reloads `hoon.hoon` and all modules. No arguments.
112+
113+ ~your-urbit:dojo> |reset
108
114
109**`|start`** - Starts an app. Accepts an app name.
115**`|start`** - Starts an app. Accepts an app name.
110
116
@@ -129,7 +135,7 @@ Set any envronment variable:
129
135
130 44
136 44
131
137
132−(There are a few special variables that the dojo expects. See below.)
138+(There are a few special variables that the dojo maintains. See below.)
133
139
134#### `:` - Send to app
140#### `:` - Send to app
135
141
@@ -149,9 +155,9 @@ Save a new `md` file in `web`:
149
155
150The last component of the path is expected to be the mark (or mime type).
156The last component of the path is expected to be the mark (or mime type).
151
157
152−#### `.` - Download to Unix
158+#### `.` - Export to Unix
153
159
154−Download a noun to Unix with `.`:
160+Export a noun to Unix with `.`:
155
161
156 ~your-urbit:dojo> .foo/bar/baz (add 2 2)
162 ~your-urbit:dojo> .foo/bar/baz (add 2 2)
157
163
@@ -181,7 +187,7 @@ Use `_` to run a gate (or function):
181 ~your-urbit:dojo> _|=({a/@} (mul a 3)) 3
187 ~your-urbit:dojo> _|=({a/@} (mul a 3)) 3
182 :: produces
188 :: produces
183 9
189 9
184− :: assign an arbitrary function to get the status code from an http request
190+ :: use a function to get the status code from an http request
185 ~your-urbit:dojo> _|=({p/@ud q/* r/*} p) +http://google.com
191 ~your-urbit:dojo> _|=({p/@ud q/* r/*} p) +http://google.com
186 :: produces
192 :: produces
187 301
193 301