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
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,13 +161,21 @@ Interpretation:
161
161
162
162
## Git integration
163
163
164
-
Use Hunk as the viewer for `git diff` and `git show`:
164
+
Use Hunk as the default Git pager:
165
+
166
+
```bash
167
+
git config --global core.pager 'hunk patch -'
168
+
```
169
+
170
+
Or scope it just to `git diff` and `git show`:
165
171
166
172
```bash
167
173
git config --global pager.diff 'hunk patch -'
168
174
git config --global pager.show 'hunk patch -'
169
175
```
170
176
177
+
When Hunk reads a patch from stdin, it automatically switches to pager-style chrome, strips Git's color escape sequences before parsing, and binds keyboard input to the controlling terminal so it works correctly as a Git pager.
0 commit comments