Add terminal colors and clarify elided hierarchy branches

This commit is contained in:
Jan Petykiewicz 2026-11-18 22:58:12 -08:00
commit 28b7f10f6e

View file

@ -32,11 +32,15 @@ pheon hierarchy chip.gds --format mermaid --top CHIP
normalized object within a cell. Coordinates are in database units. Rectangles
show two corners, and longer vertex lists wrap across lines. References show
the target and any array dimensions before the coordinates. Add `--records`
to inspect the original record sequence, including timestamps.
to inspect the original record sequence, including timestamps. In color
output, the object dump highlights cell headings and layer numbers, and the
record dump highlights record names.
`hierarchy` shows direct placement counts on references. Shared cells are
marked where their contents appear earlier in the tree. Mermaid output is
diagram source for a Mermaid renderer.
`hierarchy` shows direct placement counts on references. `[subtree elided]`
marks a repeated cell whose children were skipped. Repeated leaves show
each parent's placement count without the marker. At the depth limit,
`[children omitted]` marks a cell with further descendants. Mermaid
output is diagram source for a Mermaid renderer.
## Compare revisions
@ -66,6 +70,12 @@ vertices show their width, vertex count, and vertex bounds in one line.
Use `--format json` for details of individual objects and `--hierarchy` to see
which parent cells are affected.
`diff` and `dump` use `--color auto` by default. Colors appear on supported
terminals and are disabled when `NO_COLOR` is set or `TERM=dumb`. Use
`--color=always` to keep colors in a pipe, for example
`pheon diff before.gds after.gds --color=always | less -R`. Use
`--color=never` for plain text. JSON reports and Mermaid diagram source stay plain.
For large unscoped diffs with substantial byte overlap, Pheon reuses parsed
contents of matching cells. Cell timestamps and file offsets can differ.