v0.1.0 af61ae3

consumer-smoke.sh RawHistoryFolder

1#!/usr/bin/env bash
2set -euo pipefail
3
4root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
5if grep -q '^replace ' "$root/go.mod"; then
6	echo 'standalone module must not commit a replace directive' >&2
7	exit 1
8fi
9
10tmp=$(mktemp -d)
11trap 'rm -rf "$tmp"' EXIT
12mkdir -p "$tmp/consumer"
13cat >"$tmp/consumer/go.mod" <<EOF
14module example.com/vev-vt-consumer
15
16go 1.26
17
18require github.com/bnema/vev-vt v0.0.0
19
20replace github.com/bnema/vev-vt => $root
21EOF
22cat >"$tmp/consumer/main.go" <<'EOF'
23package main
24
25import (
26	"fmt"
27	"os"
28
29	vt "github.com/bnema/vev-vt"
30	"github.com/bnema/vev-vt/ansi"
31)
32
33func main() {
34	screen := vt.NewScreen(4, 1)
35	screen.Write([]byte("ok"))
36	output, err := ansi.New(ansi.Capabilities{}).Draw(screen.Frame.Clone(), []vt.Damage{vt.FullRedraw()})
37	if err != nil {
38		fmt.Fprintln(os.Stderr, err)
39		os.Exit(1)
40	}
41	if len(output) == 0 {
42		fmt.Fprintln(os.Stderr, "consumer received empty ANSI output")
43		os.Exit(1)
44	}
45}
46EOF
47
48(
49	cd "$tmp/consumer"
50	GOWORK=off go test ./...
51)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 13

↑↓ moveenter openesc close