# 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