A rule shows what it finds
Explore this workspace.
Technical background
The rule editor takes a line of sample text and shows what the rule actually finds in it: the match highlighted where it sits, the named captures an integration would read back, and whether the pattern compiles. It runs the rule the way the terminal will — same guard, same flags, same caps, same criteria — so it cannot claim a match the terminal would refuse. Presets already in your list are no longer offered again.
The problem
The rule editor restated the regular expression you had just typed and nothing else. The only way to find out whether a rule actually worked was to make the terminal print something it should match. And both preset menus offered every preset every time, so "Add rule" twice produced two identical rules — the Integrations page's "add as rule" had no duplicate check at all and reported success both times.
How it works
A sample box in the rule editor runs the rule the way the terminal will and shows what it finds: the matched run highlighted where it sits, the named captures an integration would read back, and whether the pattern compiles. Presets already in your list are greyed out.
Details
- Fidelity is the whole point, so the probe reproduces the live decision rather than approximating it: the same guarded regular expression, the same flags and match caps, the same input-length limit, and the same criteria beyond the pattern — a link rule also ANDs its scheme list and file-type group, and the box says which one refused.
- It builds its own regular expression rather than using the service's cached one. That one is wired to disable the rule and raise a notification when a pattern runs long, which — driven from a box someone is typing in — would kill their rule for the session and toast on every keystroke.
- Preset identity is name first, pattern as the fallback. Three presets take their pattern from a manifest and those manifests move, so a rule added before a pattern changed is still that preset to the person reading the list.
- The editor's own menu still offers the preset the open rule already is: there it means "re-sync me", not "duplicate me".
What this does not claim
- The sample text is a scratch pad. It is not stored on the rule and does not persist — the rule format is deliberately identical to the Windows Terminal fork's so rules can be pasted between them, and a field for a text box is not worth spending that on.
- A rule that came from a preset starts with that preset's own example in the box; one that did not starts empty.