You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`hunk diff -- <pathspec...>` — review only selected paths
49
+
-`hunk show [ref]` — review the last commit or a given ref in the full Hunk UI
50
+
-`hunk stash show [ref]` — review a stash entry in the full Hunk UI
51
+
-`hunk diff <left> <right>` — compare two concrete files directly
52
+
-`hunk patch [file|-]` — review a patch file or stdin, including pager mode
53
+
-`hunk difftool <left> <right> [path]` — integrate with Git difftool
54
+
-`hunk git [range]` — legacy alias for the original Git-style diff entrypoint
46
55
47
56
## Interaction
48
57
@@ -67,7 +76,7 @@ Hunk reads layered TOML config with this precedence:
67
76
1. built-in defaults
68
77
2. global config: `$XDG_CONFIG_HOME/hunk/config.toml` or `~/.config/hunk/config.toml`
69
78
3. repo-local config: `.hunk/config.toml`
70
-
4. command-specific sections like `[git]`, `[diff]`, `[patch]`, `[difftool]`
79
+
4. command-specific sections like `[git]`, `[diff]`, `[show]`, `[stash-show]`, `[patch]`, `[difftool]`
71
80
5.`[pager]` when Hunk is running in pager mode
72
81
6. explicit CLI flags
73
82
@@ -94,6 +103,8 @@ mode = "split"
94
103
CLI overrides are available when you want one-off or pager-specific behavior:
95
104
96
105
```bash
106
+
hunk diff --mode split --line-numbers
107
+
hunk show HEAD~1 --theme paper
97
108
hunk patch - --mode stack --no-line-numbers
98
109
hunk diff before.ts after.ts --theme paper --wrap
99
110
```
@@ -155,14 +166,14 @@ Files omitted from the sidecar keep their original diff order and appear after t
155
166
For Codex-driven changes, keep a transient sidecar at `.hunk/latest.json` and load it during review:
156
167
157
168
```bash
158
-
hunk git --agent-context .hunk/latest.json
169
+
hunk diff --agent-context .hunk/latest.json
159
170
```
160
171
161
172
Suggested pattern:
162
173
163
174
- Codex makes code changes.
164
175
- Codex refreshes `.hunk/latest.json` with a concise changeset summary, file summaries, and hunk-level rationale.
165
-
- You open `hunk` against the working tree, staged diff, or a commit range with that sidecar.
176
+
- You open `hunk diff`, `hunk diff --staged`, or `hunk show <ref>` with that sidecar.
166
177
167
178
Keep the sidecar concise. It should explain why a hunk exists, what risk to review, and how the files fit together. It should not narrate obvious syntax edits line by line.
168
179
@@ -212,7 +223,18 @@ Interpretation:
212
223
213
224
## Git integration
214
225
215
-
Use Hunk as the default Git pager:
226
+
For full-screen review, you can invoke Hunk directly with Git-shaped commands:
227
+
228
+
```bash
229
+
hunk diff
230
+
hunk diff --staged
231
+
hunk diff main...feature
232
+
hunk show
233
+
hunk show HEAD~1
234
+
hunk stash show
235
+
```
236
+
237
+
Use Hunk as the default Git pager when you want it to behave like a normal pager under `git diff` / `git show`:
0 commit comments