summaryrefslogtreecommitdiff
path: root/test/snapshots/grep.snap
blob: 16e61d20fadc54f6ec353e76681169a6d9e323ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# The Grep builtin (topbar word, `SPC f g`): the query pane under the pane
# that asked, line 1 `Grep ` and the text, the lines of the files below its
# directory holding it (literally, any case unless it has a capital), on the
# disk engine's worker once the typing pauses: rg --json when it is on PATH,
# else the sorted walk. The rows sit under their file's name, a line number
# in the gutter. A hit in a file an open pane shows is shown there; one in a
# file nothing shows, in the +Preview under the query pane, which Enter makes
# the file's pane. A query that matches nothing is a count of 0, and Esc
# while typing brings the kept rows back.
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
config Verbose off
start 31 180 -n 3
wait 8000 a.txt
stable 700 20000
press left 5 9
release left 5 9
stable 400 5000
key i
text a.txt
key esc
settle 100
stable 400 5000
press right 6 9
release right 6 9
wait 10000 hello TARGET
stable 700 15000
snap opened
# middle-click Grep on the topbar: the query pane under a.txt, typed into
press middle @Grep 1
release middle @Grep 1
stable 400 5000
text TARGET
# three lines (the pane is short: its count says how many)
wait 10000 +Search 1/3
stable 700 15000
snap typing
# a.txt's hits are shown in a.txt; sub/b.txt's in the preview
key c-n
stable 700 15000
snap second
key c-n
wait 10000 deep
stable 700 15000
snap preview
key enter
stable 700 15000
snap opened-hit
key space
key f
key g
stable 400 5000
text zzqq
stable 700 10000
snap nomatch
key esc
settle 100
stable 400 5000
snap esc