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
Copy file name to clipboardExpand all lines: README.md
+51Lines changed: 51 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,11 +51,62 @@ If you want a different install location, set `HUNK_INSTALL_DIR` before running
51
51
-`0` auto layout
52
52
-`t` cycle themes
53
53
-`a` toggle the agent panel
54
+
-`l` toggle line numbers
55
+
-`w` toggle line wrapping
56
+
-`m` toggle hunk metadata
54
57
-`[` / `]` move between hunks
58
+
-`space` / `b` page forward and backward
55
59
-`/` focus the file filter
56
60
-`tab` cycle focus regions
57
61
-`q` or `Esc` quit
58
62
63
+
## Configuration
64
+
65
+
Hunk reads layered TOML config with this precedence:
66
+
67
+
1. built-in defaults
68
+
2. global config: `$XDG_CONFIG_HOME/hunk/config.toml` or `~/.config/hunk/config.toml`
69
+
3. repo-local config: `.hunk/config.toml`
70
+
4. command-specific sections like `[git]`, `[diff]`, `[patch]`, `[difftool]`
71
+
5.`[pager]` when Hunk is running in pager mode
72
+
6. explicit CLI flags
73
+
74
+
When you change persistent view settings inside Hunk, it writes them back to `.hunk/config.toml` in the current repo when possible, or to the global config file outside a repo.
75
+
76
+
Example:
77
+
78
+
```toml
79
+
theme = "midnight"
80
+
mode = "auto"
81
+
line_numbers = true
82
+
wrap_lines = false
83
+
hunk_headers = true
84
+
agent_notes = false
85
+
86
+
[pager]
87
+
mode = "stack"
88
+
line_numbers = false
89
+
90
+
[diff]
91
+
mode = "split"
92
+
```
93
+
94
+
CLI overrides are available when you want one-off or pager-specific behavior:
95
+
96
+
```bash
97
+
hunk patch - --mode stack --no-line-numbers
98
+
hunk diff before.ts after.ts --theme paper --wrap
99
+
```
100
+
101
+
Supported persistent CLI overrides:
102
+
103
+
-`--mode <auto|split|stack>`
104
+
-`--theme <theme>`
105
+
-`--line-numbers` / `--no-line-numbers`
106
+
-`--wrap` / `--no-wrap`
107
+
-`--hunk-headers` / `--no-hunk-headers`
108
+
-`--agent-notes` / `--no-agent-notes`
109
+
59
110
## Agent sidecar format
60
111
61
112
Use `--agent-context <file>` to load a JSON sidecar and show agent rationale next to the diff.
0 commit comments