diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-31 02:40:11 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:08 -0300 |
| commit | 7022d738dba00049e820e969cabc34ecbeaea465 (patch) | |
| tree | 28d32929255ba21144d579e210a658f6c1fb1943 /test/snapshots/builtins.snap | |
| parent | 0bfa4615988c0d1bcaa38453375760c60076c5ea (diff) | |
| download | pardes-7022d738dba00049e820e969cabc34ecbeaea465.tar.gz pardes-7022d738dba00049e820e969cabc34ecbeaea465.zip | |
Help lists every builtin and every way to reach it
Not a second builtin: Help already rendered "every builtin with a leader path
and the key that runs it", and the ask is "every builtin and every shortcut" —
the same listing with three more rows and one more column. A new builtin would
have been a second renderer over a superset of the same rows, and the two would
drift the first time a column moved. The prefix filter is now the degenerate
case of the index rather than a separate mode: SPC h ? reads the same array
with prefix "h", and the path-less builtins fall out on their own because an
empty path starts with nothing.
The shortcut column is folded, never typed: chordName spells a chord from Key's
OWN declarations, so a new special key names itself and an unnamed
non-printable codepoint is a compile error instead of garbage; shortcuts()
walks the cmd columns of window_keys and jump_keys, look_cmd/exec_cmd with
their keys and buttons, and topbar_str. Retarget a binding in config.zig and
this re-renders.
So Look reads `enter, right-click`, Back reads `C-o`, Kill reads `topbar`, and
Theme reads nothing at all — which is the information.
Not a picker, deliberately: n/N stepping a list holding Kill, Del and Delcol
would end the session. The names are live text, so middle-click the one you
want.
Alt-n, Alt-c, the tty toggle and the cut/paste chords cannot appear — they are
inline handlers that reach no builtin, so there is no row to put them on. Make
one a struct with a cmd column beside its binding and it appears for free.
Three goldens moved, all of them the +Help buffer's contents.
Diffstat (limited to 'test/snapshots/builtins.snap')
| -rw-r--r-- | test/snapshots/builtins.snap | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/test/snapshots/builtins.snap b/test/snapshots/builtins.snap new file mode 100644 index 00000000..b2c4f752 --- /dev/null +++ b/test/snapshots/builtins.snap @@ -0,0 +1,60 @@ +# RULE: Help is THE INDEX of the builtins — every one of them, and every way +# to run it — not a listing of leader paths. Three columns, all derived at +# comptime from config.zig's own tables: the SPC path (leader_path), the name, +# and every other shortcut bound to that name (window_keys and jump_keys' `cmd` +# columns, look_cmd/exec_cmd with their keys and mouse buttons, a word in +# topbar_str). A builtin added tomorrow is a row here with nothing to edit. +# +# The cases this exists for are the ones a leader listing could not show: +# Look and Exec have NO SPC path — their shortcuts are Enter/Tab and the two +# mouse buttons — and Theme has no shortcut at all, because a key path can +# never carry the name of a theme. All three are rows, and their blank columns +# are the information. +# +# `SPC ?` mid-chord is the SAME array read with a non-empty prefix, which is +# why there is one builtin here and not two: the group filter drops the +# path-less rows by itself, and the reference page is the filter's empty case. +lines notes.txt 6 +start 60 120 notes.txt +wait 8000 notes.txt +stable 700 20000 +snap boot +# SPC ? at the ROOT. Focus follows the listing — you asked to read it. +key space ? +wait 10000 SPC c n +stable 700 15000 +snap index +# The tail of the same listing: the window group carries BOTH spellings of +# each Ctrl-w chord (the table carries both), and past the last path come the +# three builtins SPC cannot reach. `ge` walks the buffer's own body to the end. +key g e +stable 700 15000 +snap index-tail +# n/N here must NOT run the rows. ThemeSel's buffer executes what it steps +# onto, and that is safe because wearing a theme is free; this list holds Kill, +# Del and Delcol, so stepping it would end the session. Three presses, and the +# panes and the listing are all where they were. +key n +key n +key n +stable 700 15000 +snap not-a-picker +# and the mid-chord filter is untouched: `SPC w ?` still answers "what can w +# still reach", rewriting the same +Help buffer with just that group — five +# rows, each now also showing the Ctrl-w chord that is the other way in, and +# none of the three path-less builtins, which `w` cannot reach. +key space w ? +wait 10000 Toggleterm +stable 700 15000 +snap window-group +# back to the whole index, and a NAME in it is live text like anywhere else: +# middle-click `Tutor` and the tutor opens. That is the picking a stepping +# picker would have done, minus running the thirty-nine rows you passed. +key space ? +wait 10000 SPC c n +stable 700 15000 +press middle 20 44 +release middle 20 44 +wait 10000 PARDES TUTOR +stable 700 15000 +snap tutor-from-index |
