Browser
Tip
TL;DR
j/kmove with a live preview,lorEnteropens,hgoes up./filters.spacemarks images in any folder;Enterthen views them,ttiles them,dcompares them.cccopies the path.Escclears the filter, then the marks.
rega with no arguments, or with a folder, starts here:
rega # the current folder
rega shots/ # another one
Three columns, like the column view in the macOS Finder: the parent folder on the left, the current folder in the middle, and a preview of the selected entry (the row under the cursor) on the right. Images preview at full resolution; text files show their first lines.
┌ parent ──┬ current ─────────────────────┬ preview ─────────┐
│ renders │ ≋ shot.####.exr [1001-1100] │ │
│ ▸ shots │ ▪ chart.exr │ (the image) │
│ │ ▪ hdr-sky.exr │ │
└──────────┴──────────────────────────────┴──────────────────┘
Keys
Browser
| Key | Does |
|---|---|
j/k ↑/↓ | move |
h/l ←/→ | parent / enter dir or view image |
gg / G | top / bottom |
/ | fuzzy filter (Enter keep, Esc clear) |
e | expand sequence into frames / collapse |
. | toggle hidden files |
space | mark (view marked together) |
a | mark every image here (again: unmark) |
t | view tiled: the marked side by side |
d | diff the marked in pairs (one marked: with this) |
click | select (double: open) / parent dir |
Shift / Ctrl+click | mark a range / mark one more |
cc cd | copy path / folder (marked: all of them) |
cf cn | copy file name / name without extension |
o | choose → –chooser-file, quit |
q / Q | quit |
q quits from the browser. Q quits rega from anywhere.
Moving around
j / k (or the arrows) move, gg / G jump to the top and bottom. l, → or
Enter goes into a folder or opens an image in the viewer; h or
← goes back up. On a text file, l moves into the preview to scroll it.
With the mouse: a click selects, a double-click opens, a click in the parent column goes there. Drag the column dividers to resize them.
In the window, q goes back to the start screen instead of quitting.
. shows hidden files.
Filter
/ starts a fuzzy filter over the current folder: type, and only the matches stay.
Enter keeps the filter and goes back to moving; Esc clears it.
Sequences
Numbered frames collapse into one entry: shot.1001.exr … shot.1100.exr becomes
≋ shot.####.exr [1001-1100], with the total size. Gaps show in the range
([1001-1005,1009-1014,1016-1024]). Two frames make a sequence; a lone numbered file
stays a file.
e expands the selected sequence into its frames, and folds them back.
Note
The listing follows the disk: new files and frames appear as they’re written. A half-written EXR previews as an incomplete image.
Marks
Marking picks images to open together, like a selection that stays as you move between
folders. space marks the selected image (again: unmarks it); a marks every image in
the folder (again: unmarks them). Marked rows show in yellow, in the order you marked
them. Esc clears every mark (after the filter, if one is set). With the mouse,
Shift+click marks the images from the selected row to the clicked one, Ctrl+click
marks or unmarks one (many terminals keep Shift+click for themselves; the window
doesn’t).
With marks, Enter or l on any image opens the marked images, not the one under the
cursor:
Enterviews them one at a time:n/pstep between them.topens them in a tiled view.dcompares them in pairs: the 1st with the 2nd, the 3rd with the 4th, … With one marked,dcompares it with the selected image.
Copying paths
c, then a second key, copies to the clipboard: the marked entries, one per line, or
the selected one when nothing is marked.
| Keys | Copies |
|---|---|
cc | the full path |
cd | the folder it’s in |
cf | the file name |
cn | the name without its extension |
A sequence copies as its frame pattern, /renders/shot.####.exr, which Nuke and other viewers
read as is. The bottom line shows what was copied. The copy works over ssh and in tmux the
same way as y in the panes (see Copying).
Picking files for other tools
rega can act as a file picker. With --chooser-file FILE, o writes paths to FILE,
one per line, and quits: the marked images, or the selected entry when nothing is marked
(a sequence as its first frame). Enter still opens the viewer.
rega --chooser-file /tmp/picked shots/ && cat /tmp/picked
--cwd-file FILE writes the folder you were in when you quit, so a shell function can
follow you there:
re() {
local f; f=$(mktemp)
rega --cwd-file "$f" "$@"
cd "$(cat "$f")" && rm -f "$f"
}