diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 02:27:22 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 09:54:56 -0300 |
| commit | 18e25095a8fe76943a120bcf30225e5a01ab1858 (patch) | |
| tree | 05fb37cf9fc42fe99b9ecb04dfe1ce0332c969fb | |
| parent | d4485660aa6339dbe546a81f4b543d68dfbfa9ec (diff) | |
| download | pardes-18e25095a8fe76943a120bcf30225e5a01ab1858.tar.gz pardes-18e25095a8fe76943a120bcf30225e5a01ab1858.zip | |
snapshots: cmdword, lookpanes and ttylook come back for a directory looked at opening the pane that lists it: cmdword's `@`Look .`` opens the cwd/ pane listing zzmark.txt, whose tag then runs the bare Exec as nothing and the command word as a command pane (a shell's tag typed it into the shell); lookpanes' alpha is its directory pane, through which zqonly.txt and then pick.txt resolve in access order as through the shell in alpha before; ttylook's Return on sub opens the empty sub/ pane, which n leaves for the pane it was looked out of, and its last capture, which looks the `ls` under the cursor into a +Search, is named cursorword for what it pins (it was fileopen, after a big.txt it never opened)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
| -rw-r--r-- | test/snapshots/cmdword.golden | 30 | ||||
| -rw-r--r-- | test/snapshots/cmdword.snap | 93 | ||||
| -rw-r--r-- | test/snapshots/lookpanes.golden | 80 | ||||
| -rw-r--r-- | test/snapshots/lookpanes.snap | 95 | ||||
| -rw-r--r-- | test/snapshots/ttylook.golden | 70 | ||||
| -rw-r--r-- | test/snapshots/ttylook.snap | 69 |
6 files changed, 437 insertions, 0 deletions
diff --git a/test/snapshots/cmdword.golden b/test/snapshots/cmdword.golden new file mode 100644 index 00000000..a25711ee --- /dev/null +++ b/test/snapshots/cmdword.golden @@ -0,0 +1,30 @@ +== snap opened grid=120x31 cursor=7,3 +| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit +| New Term Find Grep Joincol Delcol +| /tmp/pardes-snap/cmdword/cwd/cmds.txt Save Term Collapse Del +| 1 @`echo ZZ''E` @`echo ZZ''L` Look p.txt @`Look .` +== snap atexec grid=120x31 cursor=7,3 +|17: /tmp/pardes-snap/cmdword/cwd (echo ZZ''E) exit 0 Kill Save Collapse Del +|18: % echo ZZ''E +|19: ZZE +|20: exit 0 +== snap atlook grid=120x31 cursor=2,24 +|17: /tmp/pardes-snap/cmdword/cwd (echo ZZ''L) exit 0 Kill Save Collapse Del +|21: % echo ZZ''L +|22: ZZL +|23: exit 0 +== snap lookword grid=120x31 cursor=7,6 +|5: /tmp/pardes-snap/cmdword/cwd/p.txt Save Term Collapse Del +|6: 1 just text +== snap nested grid=120x31 cursor=7,9 +|8: /tmp/pardes-snap/cmdword/cwd/ Get Term Collapse Del +|9: 1 cmds.txt p.txt zzmark.txt +|10: 2 +== snap execword grid=120x31 cursor=7,9 +|8: /tmp/pardes-snap/cmdword/cwd/ Get Term Collapse Del Exec +== snap tagcmd grid=120x31 cursor=7,9 +|8: /tmp/pardes-snap/cmdword/cwd/ Get Term Collapse Del Exec @`echo ZZ''T` +|17: /tmp/pardes-snap/cmdword/cwd (echo ZZ''T) exit 0 Kill Save Collapse Del +|24: % echo ZZ''T +|25: ZZT +|26: exit 0 diff --git a/test/snapshots/cmdword.snap b/test/snapshots/cmdword.snap new file mode 100644 index 00000000..34554d6d --- /dev/null +++ b/test/snapshots/cmdword.snap @@ -0,0 +1,93 @@ +# `@`...`` — a word that names a COMMAND instead of a file to open. The +# delimiters are config.cmd_open/cmd_close and nothing else in the editor knows +# how one is spelled. +# +# A backtick is not a file char, so the ordinary word expansion would stop dead +# inside one and hand a look the fragment `echo`. config.wordBounds takes the +# whole run instead, which is what makes a single CLICK the way you invoke one +# (acme does the same for its own `<`/`|`/`>` command words). +# +# EXECUTE runs it, as a command pane, and leaves you where you were; LOOK runs +# it and lands you in the pane that answered — looking at a thing means being +# shown it, and a directory's look is a pane listing it, as acme's directory +# window is. +# +# And Look and Exec are ORDINARY BUILTINS now, so their names are executable +# words like Save or Grep: `Look p.txt` run off the page is the same look a +# right click on `p.txt` is. Which is also what makes `@`Look .`` nest — Exec +# unwraps it and the contents go straight back through the one dispatcher. +file cmds.txt @`echo ZZ''E` @`echo ZZ''L` Look p.txt @`Look .` +file p.txt just text +file zzmark.txt x +# Builtins announce themselves by default, and an announcement is a band at +# the top of the body -- which would move every row this script clicks. The +# verbs are what is under test here, not the announcement. +config Verbose off +start 31 120 cmds.txt +wait 8000 Newcol Joincol +wait 8000 cmds.txt +stable 700 20000 +snap opened +# a single middle CLICK inside the run (col 11 is inside `echo`) expands to the +# whole `@`echo ZZ''E`` and runs it as a command pane; focus stays on the file +press middle 11 4 +release middle 11 4 +wait 10000 ZZE +stable 700 15000 +snap atexec +# LOOK on the second one (col 24, inside its `echo`) runs it too, in the same +# command pane now its first is done, below it, AND focuses it — that is the +# whole difference between the two verbs +press right 24 4 +release right 24 4 +wait 10000 ZZL +stable 700 15000 +snap atlook +# `Look p.txt` middle-dragged: the builtin by NAME, with an argument +press middle 36 4 +drag middle 45 4 +release middle 45 4 +wait 10000 just text +stable 700 15000 +snap lookword +# nesting: `@`Look .`` — Exec unwraps it, `Look .` is parsed as the ordinary +# Look builtin with an argument, and Look opens the directory: a pane named +# for it with a trailing /, listing it (zzmark.txt is only ever in that +# listing: no pane here shows it otherwise), which takes the keyboard +press middle 49 4 +release middle 49 4 +wait 10000 zzmark.txt +stable 700 15000 +snap nested +# the same syntax typed into a TAG — the other place the expansion has to know +# about backticks. The look above left the directory pane focused, so `:` +# opens ITS tag; `A` appends at the end of it, Esc and `h` put the +# normal-mode cursor on the last character typed, and the execute key runs +# the word under it exactly as the body's does. +key : +key A +key space +text Exec +key esc +settle 100 +key h +key tab +stable 700 8000 +# ...except that word is `Exec` ITSELF, with nothing to execute. This is the +# case that must not hang a re-entrant dispatcher: it runs out of argument +# immediately and does nothing at all. Executing gave the keyboard back to the +# body, and `:` finds the tag's cursor where it was left. +snap execword +# a command word run from that tag runs as a command pane in the directory +# the pane lists, as a word run from any text pane's tag does +key : +key A +key space +text @`echo ZZ''T` +key esc +settle 100 +key h +key tab +wait 10000 ZZT +stable 700 15000 +snap tagcmd diff --git a/test/snapshots/lookpanes.golden b/test/snapshots/lookpanes.golden new file mode 100644 index 00000000..f3cf71ac --- /dev/null +++ b/test/snapshots/lookpanes.golden @@ -0,0 +1,80 @@ +== snap shells grid=130x51 cursor=122,4 +| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit +| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol +| /tmp/pardes-snap/lookpanes/cwd/beta/bmark.txt Save Term Collaps /tmp/pardes-snap/lookpanes/cwd Term+bash Save Mode Filter Colla +| e Del pse Del +| 1 both.txt ls zqonly.txt pick.txt twin.txt +| 2 b-marker alpha beta zzboot.txt +| +| /tmp/pardes-snap/lookpanes/cwd/alpha/ Get Term Collapse Del +| 1 amark.txt pick.txt zqonly.txt +| 2 both.txt twin.txt +| 3 +== snap other-dir grid=130x51 cursor=7,8 +|6: /tmp/pardes-snap/lookpanes/cwd/alpha/zqonly.txt Save Term Colla +|7: pse Del /tmp/pardes-snap/lookpanes/cwd/alpha/ Get Term Collapse Del +|8: 1 ONLY-IN-ALPHA 1 amark.txt pick.txt zqonly.txt +== snap clicked-wins grid=130x51 cursor=7,12 +|10: /tmp/pardes-snap/lookpanes/cwd/beta/both.txt Save Term Collapse 3 +|11: Del +|12: 1 BOTH-FROM-BETA +== snap mru-alpha grid=130x51 cursor=72,12 +|10: /tmp/pardes-snap/lookpanes/cwd/beta/both.txt Save Term Collapse /tmp/pardes-snap/lookpanes/cwd/alpha/pick.txt Save Term Collaps +|11: Del e Del +|12: 1 BOTH-FROM-BETA 1 PICK-FROM-ALPHA +== snap mru-beta grid=130x51 cursor=7,16 +|14: /tmp/pardes-snap/lookpanes/cwd/beta/twin.txt Save Term Collapse +|15: Del +|16: 1 TWIN-FROM-BETA +== style mru-beta grid=130x51 +|0: 0-1 d,#1d2824, 2-129 #b2c3b8,#1d2824, +|1: 0-1 d,#887455, 2-64 #becfc4,#314738, 65-66 #becfc4,#887455, 67-129 #b2c3b8,#1d2824, +|2: 0-1 d,#496656, 2-37 #b2c3b8,#1d2824, 38-47 #d3b0d9,#1d2824, 48-64 #b2c3b8,#1d2824, 65-66 #b2c3b8,#496656, 67-97 #b2c3b8,#1d2824, 98-107 #d3b0d9,#1d2824, 108-129 #b2c3b8,#1d2824, +|3: 0-1 d,#1d2824, 2-129 #b2c3b8,#1d2824, +|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-129 #e5eee5,#0d1410, +|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-129 #e5eee5,#0d1410, +|6: 0-1 d,#496656, 2-38 #b2c3b8,#1d2824, 39-49 #d3b0d9,#1d2824, 50-64 #b2c3b8,#1d2824, 65-65 #b2c3b8,#608269, 66-129 #b2c3b8,#0d1410, +|7: 0-1 d,#1d2824, 2-64 #b2c3b8,#1d2824, 65-66 #b2c3b8,#496656, 67-129 #b2c3b8,#1d2824, +|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-69 #e5eee5,#0d1410, 70-71 #59675c,#0d1410, 72-129 #e5eee5,#0d1410, +|9: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#152019, 66-69 d,#0d1410, 70-71 #59675c,#0d1410, 72-129 #e5eee5,#0d1410, +|10: 0-1 d,#496656, 2-37 #b2c3b8,#1d2824, 38-46 #d3b0d9,#1d2824, 47-64 #b2c3b8,#1d2824, 65-66 #b2c3b8,#496656, 67-103 #b2c3b8,#1d2824, 104-112 #d3b0d9,#1d2824, 113-129 #b2c3b8,#1d2824, +|11: 0-2 d,#1d2824, 3-129 #b2c3b8,#1d2824, +|12: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-69 #e5eee5,#0d1410, 70-71 #59675c,#0d1410, 72-129 #e5eee5,#0d1410, +|13: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|14: 0-1 d,#add38a, 2-37 #becfc4,#314738, 38-46 #dfbce5,#314738, 47-64 #becfc4,#314738, 65-65 #becfc4,#608269, 66-129 #becfc4,#0d1410, +|15: 0-2 d,#314738, 3-64 #becfc4,#314738, 65-65 #becfc4,#608269, 66-129 #becfc4,#0d1410, +|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-129 #e5eee5,#0d1410, +|17: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|18: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|19: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|20: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|21: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|22: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|23: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|24: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|25: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|26: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|27: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|28: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|29: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|30: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|31: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|32: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|33: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|34: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|35: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|36: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|37: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|38: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|39: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|40: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|41: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|42: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|43: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|44: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|45: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|46: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|47: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|48: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|49: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, +|50: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, diff --git a/test/snapshots/lookpanes.snap b/test/snapshots/lookpanes.snap new file mode 100644 index 00000000..4bbc37d6 --- /dev/null +++ b/test/snapshots/lookpanes.snap @@ -0,0 +1,95 @@ +# a look resolves against EVERY open pane's directory, in access order: the +# pane the click came from first, then the rest most-recently-focused first, +# and only a word NO directory holds falls through to a search. Two dirs +# (alpha, beta) hold same-named files and the shell's own cwd holds none of +# them, so every look below would have been a search before. alpha's pane +# is its directory window (a look at a directory opens a pane listing it), +# whose directory is alpha. +dirmk alpha +dirmk beta +file zzboot.txt x +file alpha/amark.txt a +file alpha/zqonly.txt ONLY-IN-ALPHA +file alpha/pick.txt PICK-FROM-ALPHA +file alpha/twin.txt TWIN-FROM-ALPHA +file alpha/both.txt BOTH-FROM-ALPHA +file beta/pick.txt PICK-FROM-BETA +file beta/twin.txt TWIN-FROM-BETA +file beta/both.txt BOTH-FROM-BETA +# the file argument opens a pane whose directory is beta's, and nothing else — +# so the workdir shell every look below falls through is opened with Alt-n +# (`New`/`Newcol` open an empty +New scratch now, and one inheriting beta's +# directory at that) and Alt-c puts it in a column of its own on the right; +# its first line is a word to look FROM that pane +file beta/bmark.txt both.txt\nb-marker +# Builtins announce themselves by default, and an announcement is a band at +# the top of the body -- which moves every row this script clicks. What the +# verbs do is what is under test, not the announcement. +config Verbose off +start 51 130 beta/bmark.txt +wait 8000 b-marker +stable 700 20000 +key a-n +key a-c +wait 8000 zzboot.txt +stable 700 20000 +key space w h +stable 400 5000 +# an ordinary dir look on the shell's own ls output: alpha's directory pane, +# split below it, which takes the keyboard +press right @alpha 6 +release right @alpha 6 +wait 10000 amark.txt +stable 700 20000 +# type the words to look into what is left of the workdir shell (past its own +# ls output, on the same row: its last row is the resize handle) +press left 95 5 +release left 95 5 +stable 400 5000 +key i +text zqonly.txt pick.txt twin.txt +key esc +settle 100 +stable 400 5000 +snap shells +# make the beta pane the most recently focused, so the walk has to pass it +press left 10 5 +release left 10 5 +stable 700 10000 +# zqonly.txt is only under alpha: the clicked shell's cwd fails, beta fails, +# alpha's directory pane answers. Before, this word became a search. +press right @zqonly.txt 5 +release right @zqonly.txt 5 +wait 10000 ONLY-IN-ALPHA +stable 700 20000 +snap other-dir +# both.txt is in BOTH dirs and alpha is now the most recent (its file pane +# just opened), but the CLICK still wins: looked inside the beta pane it +# opens beta's copy +press right 10 5 +release right 10 5 +wait 10000 BOTH-FROM-BETA +stable 700 20000 +snap clicked-wins +# from a pane whose own dir holds neither copy the access order decides: +# focus alpha's directory pane (a click on its first row), look pick.txt (in +# both dirs) from the workdir shell -> alpha's +press left @amark.txt 9 +release left @amark.txt 9 +stable 700 10000 +press right @pick.txt 5 +release right @pick.txt 5 +wait 10000 PICK-FROM-ALPHA +stable 700 20000 +snap mru-alpha +# focus the beta pane instead and the same look flips: twin.txt is in both +# dirs, beta is most recent, beta's copy opens +press left 10 5 +release left 10 5 +stable 700 10000 +press right @twin.txt 5 +release right @twin.txt 5 +wait 10000 TWIN-FROM-BETA +stable 700 20000 +snap mru-beta +snapstyle mru-beta diff --git a/test/snapshots/ttylook.golden b/test/snapshots/ttylook.golden new file mode 100644 index 00000000..f70d9287 --- /dev/null +++ b/test/snapshots/ttylook.golden @@ -0,0 +1,70 @@ +== snap tok1 grid=120x31 cursor=2,5 +| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit +| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol +| /tmp/pardes-snap/ttylook/cwd Term+bash Save Mode Filter Co /tmp/pardes-snap/ttylook/cwd Term+bash Save Mode Filter Co +| llapse Del llapse Del +| ls ls +| big.txt plain.txt sub big.txt plain.txt sub +| +| +| +| +| +| +| +| +| +| +| +| /tmp/pardes-snap/ttylook/cwd Term+bash Save Mode Filter Co +| llapse Del +| ls +| big.txt plain.txt sub +== style tok1 grid=120x31 +|0: 0-1 d,#1d2824, 2-119 #b2c3b8,#1d2824, +|1: 0-1 d,#887455, 2-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-119 #b2c3b8,#1d2824, +|2: 0-1 d,#add38a, 2-30 #becfc4,#314738, 31-40 #dfbce5,#314738, 41-59 #becfc4,#314738, 60-61 #becfc4,#496656, 62-90 #b2c3b8,#1d2824, 91-100 #d3b0d9,#1d2824, 101-119 #b2c3b8,#1d2824, +|3: 0-1 d,#314738, 2-59 #becfc4,#314738, 60-61 #becfc4,#1d2824, 62-119 #b2c3b8,#1d2824, +|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, +|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-8 #f5f7ee,#3c614a, 9-10 #f5f7ee,#0d1410, 11-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, +|6: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|7: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|8: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|9: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|10: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|11: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|12: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|13: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|14: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|15: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|16: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|17: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-40 #d3b0d9,#1d2824, 41-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410, +|18: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410, +|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, +|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, +|21: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|22: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|23: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|24: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|25: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|26: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|27: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|28: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|29: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +|30: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, +== snap tok2 grid=120x31 cursor=11,5 +== snap tokback grid=120x31 cursor=2,5 +== snap insert grid=120x31 cursor=4,5 +|5: nnbig.txt plain.txt sub big.txt plain.txt sub +== snap tok3 grid=120x31 cursor=22,5 +|5: big.txt plain.txt sub big.txt plain.txt sub +== snap diropen grid=120x31 cursor=7,8 +|7: /tmp/pardes-snap/ttylook/cwd/sub/ Get Term Collapse Del +|8: 1 +== snap noop grid=120x31 cursor=2,5 +== snap cursorword grid=120x31 cursor=3,4 +|22: /tmp/pardes-snap/ttylook/cwd/+Search Save Term Collapse Lo +|23: cationsConfig Del +|24: 1 @p1:1:1-2 +|25: 2 ls +|26: 3 diff --git a/test/snapshots/ttylook.snap b/test/snapshots/ttylook.snap new file mode 100644 index 00000000..0a125d2c --- /dev/null +++ b/test/snapshots/ttylook.snap @@ -0,0 +1,69 @@ +# tty n/N token motion (normal mode only): n/N SELECT the next/prev +# whitespace-separated token that look resolves — several per line, so the +# greet ls row hops big.txt -> plain.txt -> sub — moving the cursor to the +# token start and opening NOTHING. Return looks the selection (dir -> the +# pane listing it, file -> pane) and focus follows what opened. The first +# n wraps from the prompt row to the first token; insert-mode n still +# types; and a pane with nothing look-able in it never traps the walk, +# because the walk is a RING ACROSS PANES rather than a scan of the one +# you are in. +lines big.txt 40 +file plain.txt just text +dirmk sub +start 31 120 -n 3 +wait 8000 big.txt +stable 700 20000 +# first n: cursor sits at the shell prompt below the output — wrap lands on +# the ls row's first token, big.txt; nothing opens +key space j n +stable 400 5000 +snap tok1 +snapstyle tok1 +# same row, next token: plain.txt +key space j n +stable 400 5000 +snap tok2 +# N steps back to big.txt +key space j p +stable 400 5000 +snap tokback +# insert-mode n still types (a run splice), no stepping; undo it +key i +text nn +key esc +settle 100 +stable 400 5000 +snap insert +key u +stable 400 5000 +# resume the walk from big.txt's start: plain.txt, then sub +key space j n +stable 400 5000 +key space j n +stable 400 5000 +snap tok3 +# Return looks the selected dir: sub's directory pane opens, empty as sub +# is, and takes the keyboard +key enter +wait 10000 sub/ +stable 700 15000 +snap diropen +# the fresh pane lists nothing, sub being empty, and that is not where n +# stops: the ring is spun on the panes that have LOOKED, so the step leaves +# this pane for the one it was looked out of. That pane's cursor is on its +# last token (`sub`), so the walk runs off the end and comes round to its +# first — big.txt. +key space j n +stable 400 5000 +snap noop +# back in the first pane, Enter with the cursor ON a token looks it (no +# selection: the cursor word expands): the click puts it on the ls command +# line's `ls`, a word no file names, which a terminal lists in a +Search, +# its row the place in that terminal (@p1:1:1-2) +press left 4 5 +release left 4 5 +stable 400 5000 +key enter +wait 10000 @p1:1:1-2 +stable 700 15000 +snap cursorword |
