Nav: editing one slot of a (verb · URI) address

-- gritzko

Between Beagle CLI and the Bro pager, there is a unified navigation framework. Its mission is to make a versioned repo as navigable as a regular filesystem (cd, ls, cat, grep, etc). So moving around in the pager must not be any more complicated than moving around in the regular Unix shell. The general idea is that the current position is saved in the context URI (like $PWD), while movements mutate one axis at a time: path, revision, worktree, etc.

Verb-args-context

All Beagle commands get implemented as JavaScript modules exporting one command(context_uri, args...) function. So, CLI and pager invocations are very much alike: they take the context from the environment, find the module, call the function, pass the arguments verbatim. On top of that, the pager has context-mutating spells, so the user may rerun the last command in a slightly different context, e.g. change the directory, revision, or a worktree. E.g. with cat file.c rendered, the spell ://ABC-123 reruns it as //ABC-123/file.c — the same file from another worktree.

Every command emits {ts,verb,uri} hunks containing token streams. Hunk tokens can be click-targets containing URIs (U) or verb args spells (O).