unison/unison-src/transcripts/numbered-args.md
2024-06-26 11:49:49 -07:00

819 B

Using numbered arguments in UCM

scratch/main> alias.type ##Text Text

First lets add some contents to our codebase.

foo = "foo"
bar = "bar"
baz = "baz"
qux = "qux"
quux = "quux"
corge = "corge"
scratch/main> add

We can get the list of things in the namespace, and UCM will give us a numbered list:

scratch/main> find

We can ask to view the second element of this list:

scratch/main> find
scratch/main> view 2

And we can view multiple elements by separating with spaces:

scratch/main> find
scratch/main> view 2 3 5

We can also ask for a range:

scratch/main> find
scratch/main> view 2-4

And we can ask for multiple ranges and use mix of ranges and numbers:

scratch/main> find
scratch/main> view 1-3 4 5-6