Skip to content

Instantly share code, notes, and snippets.

@aryairani
Last active March 2, 2020 18:33
Show Gist options
  • Save aryairani/0a53d173f6742fcdc2b54578999af5ea to your computer and use it in GitHub Desktop.
Save aryairani/0a53d173f6742fcdc2b54578999af5ea to your computer and use it in GitHub Desktop.

Switching between namespaces / projects / branches / modules

Unison uses the same organizational element to represent directories, projects, sub-projects, forks, modules, etc.; currently called a "namespace".

Namespaces are trees that contain definitions of "types" and "terms", "patches", and other child namespaces.

We're still working out what a nice codebase layout might be (feel free to write up a blog post if you find one that works well for you), but in this example, we have these, along with their children (not shown):

.libs.base .libs.megaparser.master .libs.megaparser.v1 .libs.megaparser.v2 .arya.base .arya.myproject .pullrequests.runarorama.base_3.base .pullrequests.runarorama.base_3.head .pullrequests.runarorama.base_3.merged .temp

.> builtins.merge
.> move.namespace builtin .arya.base
.> cd arya.base
.arya.base> find Boolean
.arya.base> cd arya.myproject

blah blah blah more stuff about project management and patches and the value of working from the appropriate namespace, and what that is in any given case

We can pop back to the previous namespace with the back command.

.arya.myproject> back
.arya.base> back
.> back

😬 Right, ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment