mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 10:35:57 +03:00
disable names.global transcript for now
This commit is contained in:
parent
49258bc343
commit
dd81f0aa95
@ -35,7 +35,9 @@ scratch/main> names .some.place.x
|
|||||||
`names.global` searches from the root, and absolutely qualifies results
|
`names.global` searches from the root, and absolutely qualifies results
|
||||||
|
|
||||||
|
|
||||||
```ucm
|
TODO: swap this back to a 'ucm' block when names.global is re-implemented
|
||||||
|
|
||||||
|
```
|
||||||
-- We can search from a different branch and find all names in the codebase named 'x', and each of their aliases respectively.
|
-- We can search from a different branch and find all names in the codebase named 'x', and each of their aliases respectively.
|
||||||
scratch/other> names.global x
|
scratch/other> names.global x
|
||||||
-- We can search by hash, and see all aliases of that hash in the codebase
|
-- We can search by hash, and see all aliases of that hash in the codebase
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
```ucm
|
```ucm
|
||||||
scratch/main> builtins.merge lib.builtins
|
scratch/main> builtins.merge lib.builtins
|
||||||
```
|
|
||||||
|
|
||||||
|
Done.
|
||||||
|
|
||||||
|
```
|
||||||
Example uses of the `names` command and output
|
Example uses of the `names` command and output
|
||||||
|
|
||||||
```unison
|
```unison
|
||||||
@ -23,89 +25,74 @@ somewhere.y = 2
|
|||||||
I found and typechecked these definitions in scratch.u. If you
|
I found and typechecked these definitions in scratch.u. If you
|
||||||
do an `add` or `update`, here's how your codebase would
|
do an `add` or `update`, here's how your codebase would
|
||||||
change:
|
change:
|
||||||
|
|
||||||
⍟ These new definitions are ok to `add`:
|
⍟ These new definitions are ok to `add`:
|
||||||
|
|
||||||
some.otherplace.x : ##Nat
|
some.otherplace.x : Nat
|
||||||
some.otherplace.y : ##Nat
|
some.otherplace.y : Nat
|
||||||
some.place.x : ##Nat
|
some.place.x : Nat
|
||||||
somewhere.y : ##Nat
|
somewhere.y : Nat
|
||||||
somewhere.z : ##Nat
|
somewhere.z : Nat
|
||||||
|
|
||||||
```
|
```
|
||||||
```ucm
|
```ucm
|
||||||
scratch/main> add
|
scratch/main> add
|
||||||
|
|
||||||
⍟ I've added these definitions:
|
⍟ I've added these definitions:
|
||||||
|
|
||||||
some.otherplace.x : ##Nat
|
some.otherplace.x : Nat
|
||||||
some.otherplace.y : ##Nat
|
some.otherplace.y : Nat
|
||||||
some.place.x : ##Nat
|
some.place.x : Nat
|
||||||
somewhere.y : ##Nat
|
somewhere.y : Nat
|
||||||
somewhere.z : ##Nat
|
somewhere.z : Nat
|
||||||
|
|
||||||
```
|
```
|
||||||
`names` searches relative to the current path.
|
`names` searches relative to the current path.
|
||||||
|
|
||||||
```ucm
|
```ucm
|
||||||
-- We can search by suffix and find all definitions named 'x', and each of their aliases respectively.
|
-- We can search by suffix and find all definitions named 'x', and each of their aliases respectively.
|
||||||
-- But we don't see somewhere.z which is has the same value but is out of our namespace
|
scratch/main> names x
|
||||||
.some> names x
|
|
||||||
|
|
||||||
Terms
|
Terms
|
||||||
Hash: #gjmq673r1v
|
Hash: #gjmq673r1v
|
||||||
Names: otherplace.y place.x
|
Names: some.otherplace.y some.place.x somewhere.z
|
||||||
|
|
||||||
Hash: #pi25gcdv0o
|
Hash: #pi25gcdv0o
|
||||||
Names: otherplace.x
|
Names: some.otherplace.x
|
||||||
|
|
||||||
Tip: Use `names.global` to see more results.
|
Tip: Use `names.global` to see more results.
|
||||||
|
|
||||||
-- We can search by hash, and see all aliases of that hash
|
-- We can search by hash, and see all aliases of that hash
|
||||||
.some> names #gjmq673r1v
|
scratch/main> names #gjmq673r1v
|
||||||
|
|
||||||
Term
|
Term
|
||||||
Hash: #gjmq673r1v
|
Hash: #gjmq673r1v
|
||||||
Names: otherplace.y place.x
|
Names: some.otherplace.y some.place.x somewhere.z
|
||||||
|
|
||||||
Tip: Use `names.global` to see more results.
|
Tip: Use `names.global` to see more results.
|
||||||
|
|
||||||
-- If the query is absolute, treat it as a `names.global`
|
-- Works with global names too
|
||||||
.some> names .some.place.x
|
scratch/main> names .some.place.x
|
||||||
|
|
||||||
Term
|
Term
|
||||||
Hash: #gjmq673r1v
|
Hash: #gjmq673r1v
|
||||||
Names: .some.otherplace.y .some.place.x .somewhere.z
|
Names: some.otherplace.y some.place.x somewhere.z
|
||||||
|
|
||||||
Tip: Use `names.global` to see more results.
|
Tip: Use `names.global` to see more results.
|
||||||
|
|
||||||
```
|
```
|
||||||
`names.global` searches from the root, and absolutely qualifies results
|
`names.global` searches from the root, and absolutely qualifies results
|
||||||
|
|
||||||
|
|
||||||
```ucm
|
TODO: swap this back to a 'ucm' block when names.global is re-implemented
|
||||||
-- We can search by suffix and find all definitions in the codebase named 'x', and each of their aliases respectively.
|
|
||||||
.some> names.global x
|
|
||||||
|
|
||||||
Terms
|
|
||||||
Hash: #gjmq673r1v
|
|
||||||
Names: .some.otherplace.y .some.place.x .somewhere.z
|
|
||||||
|
|
||||||
Hash: #pi25gcdv0o
|
|
||||||
Names: .some.otherplace.x
|
|
||||||
|
|
||||||
-- We can search by hash, and see all aliases of that hash in the codebase
|
|
||||||
.some> names.global #gjmq673r1v
|
|
||||||
|
|
||||||
Term
|
|
||||||
Hash: #gjmq673r1v
|
|
||||||
Names: .some.otherplace.y .some.place.x .somewhere.z
|
|
||||||
|
|
||||||
-- We can search using an absolute name
|
|
||||||
.some> names.global .some.place.x
|
|
||||||
|
|
||||||
Term
|
|
||||||
Hash: #gjmq673r1v
|
|
||||||
Names: .some.otherplace.y .some.place.x .somewhere.z
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
-- We can search from a different branch and find all names in the codebase named 'x', and each of their aliases respectively.
|
||||||
|
scratch/other> names.global x
|
||||||
|
-- We can search by hash, and see all aliases of that hash in the codebase
|
||||||
|
scratch/other> names.global #gjmq673r1v
|
||||||
|
-- We can search using an absolute name
|
||||||
|
scratch/other> names.global .some.place.x
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user