on master help sign in
Merge pull request #548 from jfranklin9000/master

Added some dojo prompts for consistency

commitb971bf1c81c983663e4eb75508a8dd9f96a3acb2 authorrmariani <robert@tlon.io> dateMon 8 Jul 2019, 10:44 (7 years ago) parent26607e012d265e
1 file changed+38−19
using/filesystem.md+38−19
using/filesystem.md+38−19
@@ -22,7 +22,7 @@ When developing it's a good idea to use a separate desk. Create a `%sandbox`
2222desk based on the `%home` desk:
2323
2424```
25−|merge %sandbox ~your-urbit %home
25+~your-urbit:dojo> |merge %sandbox ~your-urbit %home
2626```
2727
2828Running `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
3030very long names.
3131
3232```
33−|merge %sandbox our %home
33+~your-urbit:dojo> |merge %sandbox our %home
3434```
3535
3636Most 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.
6060~your-urbit:dojo> +ls /=sandbox=/web
6161```
6262
63−Let's see the contents of `/=sandbox=/web/md`:
63+Let's see the contents of `/=sandbox=/web/404/hoon`:
6464
6565```
66−~your-urbit:dojo> +cat /=sandbox=/web/md
66+~your-urbit:dojo> +cat /=sandbox=/web/404/hoon
6767```
6868
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.
7070
7171```
72−~your-urbit:dojo> =dir /=sandbox=/web/md
72+~your-urbit:dojo> =dir /=sandbox=/web
7373```
7474
75−Youl'll notice that your prompt is now `~your-urbit:dojo/sandbox/web/md>`. To
76−change back to our home directory, we use `=dir` without any path.
75+You'll notice that your prompt is now
76+`~your-urbit:dojo/=/sandbox/~2018.10.2..00.35.44..d7e8/web>`.
7777
7878```
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
8086```
8187
8288Sync from your friend `~some-ship`'s `%experiment` desk to your
8389`%sandbox` desk:
8490
8591```
86−|sync %sandbox ~some-ship %experiment
92+~your-urbit:dojo> |sync %sandbox ~some-ship %experiment
8793```
8894
8995If 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
130136global namespace. That means that a file named `example.hoon` in the `/gen`
131137directory on the `%home` desk of your ship `~lodleb-ritrul` would have a
132138universal 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
134140course, doesn't mean that everyone on the network has privileges to access that
135141path.
136142
@@ -191,7 +197,8 @@ paths. For example, if you are in the `/gen` directory, you can reference a file
191197in the `/app` directory like below. (`+cat` displays the contents of a file).
192198
193199```
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
195202```
196203
197204Note 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
201208access a file called
202209
203210```
204−~fasdul-balsev-lodleb-ritrul:dojo/home/gen/gmail> +cat /===/app/=/split/hoon
211+~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen> =dir %/gmail
212+~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/gmail> +cat /===/app/=/split/hoon
205213```
206214
207215Because 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
213221command.
214222
215223```
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
217225```
218226
219227Most 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`
221229
222230##### Changing directories
223231
@@ -226,29 +234,32 @@ Change the working directory with `=dir`. It's our equivalent of the Unix `cd`.
226234For example, the syntax to navigate to `/home/gen/ask` is:
227235
228236```
229−~your-urbit:dojo> =dir /=gen=/ask
237+~your-urbit:dojo> =dir /=home=/gen/ask
230238```
231239
232240This command will turn your prompt into something like this:
233241
234242```
235−~your-urbit:dojo/gen/ask>
243+~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/ask>
236244```
237245
238246Using `=dir` without anything else uses the null path, which returns you to
239247your home desk.
240248
241249```
242−~your-urbit:dojo> =dir
250+~your-urbit:dojo/=/=/~2018.10.2..00.35.44..d7e8/gen/ask> =dir
243251```
244252
253+Your dojo prompt will turn back into `~your-urbit:dojo>`.
254+
245255To go up levels in the path hierarchy, recall the relative path expression
246256`%`. Stacking them represents another level higher in the hierarchy than
247257the current working directory for each `%` beyond the initial. The command below
248258brings you one level up:
249259
250260```
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 %%
252263```
253264
254265### Revision-control
@@ -295,6 +306,8 @@ Unmounts the path `%/web` from whatever name it was mounted as.
295306
296307Unmounts the Unix path `/generators`.
297308
309+##### Merge
310+
298311```
299312|merge desk beak[, =gem strategy]
300313```
@@ -318,6 +331,8 @@ Merge `/=home=` into `%home-work` using merge strategy `%fine`.
318331
319332Merge the `%examples` desk from `~waxbex-ribmex`
320333
334+##### Sync
335+
321336```
322337|sync desk plot [plot-desk]
323338```
@@ -337,6 +352,8 @@ that issued a star).
337352|sync %home ~doznec
338353```
339354
355+##### Unsync
356+
340357```
341358|unsync desk plot [plot-desk]
342359```
@@ -350,6 +367,8 @@ Example:
350367|unsync %home-local ~dozbud %home
351368```
352369
370+##### Label
371+
353372```
354373|label desk name`
355374```