on master help sign in
Added some dojo prompts for consistency
12d265eJohn Franklin
using/filesystem.md+38−19
@@ -22,7 +22,7 @@ When developing it's a good idea to use a separate desk. Create a `%sandbox`
22desk based on the `%home` desk:
22desk based on the `%home` desk:
23
23
24```
24```
25−|merge %sandbox ~your-urbit %home
25+~your-urbit:dojo> |merge %sandbox ~your-urbit %home
26```
26```
27
27
28Running `our` produces your ship-name, meaning that you can run the following
28Running `our` produces your ship-name, meaning that you can run the following
@@ -30,7 +30,7 @@ command instead of typing out the entire thing. Useful for comets, due to their
30very long names.
30very long names.
31
31
32```
32```
33−|merge %sandbox our %home
33+~your-urbit:dojo> |merge %sandbox our %home
34```
34```
35
35
36Most of the time we want to use Clay from Unix. Mount the entire contents of
36Most of the time we want to use Clay from Unix. Mount the entire contents of
@@ -60,30 +60,36 @@ Let's explore the `/web` directory of the `%sandbox` desk.
60~your-urbit:dojo> +ls /=sandbox=/web
60~your-urbit:dojo> +ls /=sandbox=/web
61```
61```
62
62
63−Let's see the contents of `/=sandbox=/web/md`:
63+Let's see the contents of `/=sandbox=/web/404/hoon`:
64
64
65```
65```
66−~your-urbit:dojo> +cat /=sandbox=/web/md
66+~your-urbit:dojo> +cat /=sandbox=/web/404/hoon
67```
67```
68
68
69−Now let's navigate to that folder using `=dir`, which is like `cd` in Unix.
69+Now let's navigate to `/web` on `%sandbox` using `=dir`, which is like `cd` in Unix.
70
70
71```
71```
72−~your-urbit:dojo> =dir /=sandbox=/web/md
72+~your-urbit:dojo> =dir /=sandbox=/web
73```
73```
74
74
75−Youl'll notice that your prompt is now `~your-urbit:dojo/sandbox/web/md>`. To
75+You'll notice that your prompt is now
76−change back to our home directory, we use `=dir` without any path.
76+`~your-urbit:dojo/=/sandbox/~2018.10.2..00.35.44..d7e8/web>`.
77
77
78```
78```
79−~your-urbit:dojo/sandbox/web/md> =dir
79+~your-urbit:dojo/=/sandbox/~2018.10.2..00.35.44..d7e8/web> +ls %
80+```
81+
82+To change back to our home directory, we use `=dir` without any path.
83+
84+```
85+~your-urbit:dojo/=/sandbox/~2018.10.2..00.35.44..d7e8/web> =dir
80```
86```
81
87
82Sync from your friend `~some-ship`'s `%experiment` desk to your
88Sync from your friend `~some-ship`'s `%experiment` desk to your
83`%sandbox` desk:
89`%sandbox` desk:
84
90
85```
91```
86−|sync %sandbox ~some-ship %experiment
92+~your-urbit:dojo> |sync %sandbox ~some-ship %experiment
87```
93```
88
94
89If and when your sync is successful, you will receive a message:
95If and when your sync is successful, you will receive a message:
@@ -130,7 +136,7 @@ We use `beak`s because, unlike the current internet, the Urbit network uses a
130global namespace. That means that a file named `example.hoon` in the `/gen`
136global namespace. That means that a file named `example.hoon` in the `/gen`
131directory on the `%home` desk of your ship `~lodleb-ritrul` would have a
137directory on the `%home` desk of your ship `~lodleb-ritrul` would have a
132universal address to anyone else on the network:
138universal address to anyone else on the network:
133−`~lodleb-ritrul/home/186/gen/example.hoon`. That, of
139+`/~lodleb-ritrul/home/186/gen/example/hoon`. That, of
134course, doesn't mean that everyone on the network has privileges to access that
140course, doesn't mean that everyone on the network has privileges to access that
135path.
141path.
136
142
@@ -191,7 +197,8 @@ paths. For example, if you are in the `/gen` directory, you can reference a file
191in the `/app` directory like below. (`+cat` displays the contents of a file).
197in the `/app` directory like below. (`+cat` displays the contents of a file).
192
198
193```
199```
194−~your-urbit:dojo/home/gen> +cat /===/app/curl/hoon
200+~your-urbit:dojo> =dir %/gen
201+~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen> +cat /===/app/curl/hoon
195```
202```
196
203
197Note what was substituted out, and note that we don't need to separate `=` with
204Note what was substituted out, and note that we don't need to separate `=` with
@@ -201,7 +208,8 @@ If we changed our working directory to something called `/gen/gmail`, we could
201access a file called
208access a file called
202
209
203```
210```
211+~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen> =dir %/gmail
204−~fasdul-balsev-lodleb-ritrul:dojo/home/gen/gmail> +cat /===/app/=/split/hoon
212+~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/gmail> +cat /===/app/=/split/hoon
205```
213```
206
214
207Because both paths share a directory named `/gmail` at the same position in the
215Because both paths share a directory named `/gmail` at the same position in the
@@ -213,11 +221,11 @@ We can do the same thing between desks. If `%sandbox` has been merged with
213command.
221command.
214
222
215```
223```
216−~your-urbit:dojo/home/gen/gmail> +cat /=sandbox=/app/=/split/hoon
224+~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/gmail> +cat /=sandbox=/app/=/split/hoon
217```
225```
218
226
219Most commonly this is used to avoid having to know the current revision
227Most commonly this is used to avoid having to know the current revision
220−number in the `dojo`: `~lodleb-ritrul/home/~2018.10.2..00.35.44..d7e8/gen/example.hoon`
228+number in the `dojo`: `/~lodleb-ritrul/home/~2018.10.2..00.35.44..d7e8/gen/example/hoon`
221
229
222##### Changing directories
230##### Changing directories
223
231
@@ -226,29 +234,32 @@ Change the working directory with `=dir`. It's our equivalent of the Unix `cd`.
226For example, the syntax to navigate to `/home/gen/ask` is:
234For example, the syntax to navigate to `/home/gen/ask` is:
227
235
228```
236```
229−~your-urbit:dojo> =dir /=gen=/ask
237+~your-urbit:dojo> =dir /=home=/gen/ask
230```
238```
231
239
232This command will turn your prompt into something like this:
240This command will turn your prompt into something like this:
233
241
234```
242```
235−~your-urbit:dojo/gen/ask>
243+~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/ask>
236```
244```
237
245
238Using `=dir` without anything else uses the null path, which returns you to
246Using `=dir` without anything else uses the null path, which returns you to
239your home desk.
247your home desk.
240
248
241```
249```
242−~your-urbit:dojo> =dir
250+~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/ask> =dir
243```
251```
244
252
253+Your dojo prompt will turn back into `~your-urbit:dojo>`.
254+
245To go up levels in the path hierarchy, recall the relative path expression
255To go up levels in the path hierarchy, recall the relative path expression
246`%`. Stacking them represents another level higher in the hierarchy than
256`%`. Stacking them represents another level higher in the hierarchy than
247the current working directory for each `%` beyond the initial. The command below
257the current working directory for each `%` beyond the initial. The command below
248brings you one level up:
258brings you one level up:
249
259
250```
260```
251−~your-urbit:dojo/gen> =dir %%
261+~your-urbit:dojo> =dir %/gen
262+~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen> =dir %%
252```
263```
253
264
254### Revision-control
265### Revision-control
@@ -295,6 +306,8 @@ Unmounts the path `%/web` from whatever name it was mounted as.
295
306
296Unmounts the Unix path `/generators`.
307Unmounts the Unix path `/generators`.
297
308
309+##### Merge
310+
298```
311```
299|merge desk beak[, =gem strategy]
312|merge desk beak[, =gem strategy]
300```
313```
@@ -318,6 +331,8 @@ Merge `/=home=` into `%home-work` using merge strategy `%fine`.
318
331
319Merge the `%examples` desk from `~waxbex-ribmex`
332Merge the `%examples` desk from `~waxbex-ribmex`
320
333
334+##### Sync
335+
321```
336```
322|sync desk plot [plot-desk]
337|sync desk plot [plot-desk]
323```
338```
@@ -337,6 +352,8 @@ that issued a star).
337|sync %home ~doznec
352|sync %home ~doznec
338```
353```
339
354
355+##### Unsync
356+
340```
357```
341|unsync desk plot [plot-desk]
358|unsync desk plot [plot-desk]
342```
359```
@@ -350,6 +367,8 @@ Example:
350|unsync %home-local ~dozbud %home
367|unsync %home-local ~dozbud %home
351```
368```
352
369
370+##### Label
371+
353```
372```
354|label desk name`
373|label desk name`
355```
374```