summaryrefslogtreecommitdiff
path: root/test/snapshots/grep.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-28 16:49:51 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:07 -0300
commit65b207c3392c75eac3f2b18a266a6482d8345df1 (patch)
tree640f449b6e603d8cd5a01e94e40b12b8551d52d4 /test/snapshots/grep.snap
parent0b5ad7a30ba9e7c6eedcb426be294bd94219310f (diff)
downloadpardes-65b207c3392c75eac3f2b18a266a6482d8345df1.tar.gz
pardes-65b207c3392c75eac3f2b18a266a6482d8345df1.zip
Builtins (Find, Grep) qol improvements and ui fixes
Diffstat (limited to 'test/snapshots/grep.snap')
-rw-r--r--test/snapshots/grep.snap79
1 files changed, 79 insertions, 0 deletions
diff --git a/test/snapshots/grep.snap b/test/snapshots/grep.snap
new file mode 100644
index 00000000..12ff2c70
--- /dev/null
+++ b/test/snapshots/grep.snap
@@ -0,0 +1,79 @@
+# The Grep builtin (topbar word, `SPC f g`): `grep -R`, in-core. It arms the
+# SAME tag input `/` and Find use, but the walk reads file CONTENTS under every
+# pane's directory at once — minus any directory another pane's already
+# contains, so a tree two panes sit in is searched ONCE and every hit appears
+# once. A row is `path:LINE:COL text` with the path RELATIVE to the directory
+# of the pane that asked — the same directory its results buffer is named in,
+# so the short name resolves; only a hit from outside that tree stays absolute.
+# n/N walk the rows like any other result list, and a row pointing into a file
+# nothing has open yet opens it.
+dirmk sub
+file a.txt hello TARGET one\nnothing here\nlast TARGET line
+file sub/b.txt deep\nTARGET inside sub
+file noise.txt nothing to see
+start 30 180 -n 3
+wait 8000 a.txt
+stable 700 20000
+# open a.txt: a SECOND pane, whose directory the shell's cwd already covers —
+# its root is dropped, which is what keeps the hits below un-duplicated
+press left 5 8
+release left 5 8
+stable 400 5000
+key i
+text a.txt
+key esc
+settle 100
+stable 400 5000
+press right 6 8
+release right 6 8
+wait 10000 hello TARGET
+stable 700 15000
+snap opened
+# middle-click Grep on the topbar (row 1, the word's own column): the input
+# arms on the ACTIVE pane's tag, exactly where `/` would have typed
+press middle 45 1
+release middle 45 1
+stable 400 5000
+text TARGET
+stable 400 5000
+snap typing
+# Enter walks: two hits in a.txt, one in sub/b.txt, sorted by path — and the
+# file that holds none of them contributes no row
+key enter
+wait 10000 sub/b.txt:2:1
+stable 700 15000
+snap results
+# n looks the first row: absolute path, line 1, column 7 (the `T`)
+key n
+stable 700 15000
+snap first
+# ...and stepping on into sub/b.txt opens the file nothing had open
+key n
+stable 700 15000
+key n
+wait 10000 TARGET inside sub
+stable 700 15000
+snap opened-hit
+# a pattern nothing holds: an empty list of its own, n has nowhere to go
+press middle 45 1
+release middle 45 1
+stable 400 5000
+text zzqq
+key enter
+stable 700 10000
+key n
+stable 400 5000
+snap nomatch
+# the acme chord: a builtin executed with a SELECTION held takes it as the
+# argument, so dragging over `TARGET` in a.txt and then clicking Grep runs the
+# walk on that word at once — no tag input, nothing typed
+press left 14 3
+drag left 20 3
+release left 20 3
+stable 400 5000
+snap chordsel
+press middle 45 1
+release middle 45 1
+wait 10000 sub/b.txt:2:1
+stable 700 15000
+snap chord