@aymanbagabas/drift 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,7 +117,7 @@ git diff | drift # pager mode: read a diff from stdin
|
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
> [!TIP]
|
|
120
|
-
> Pair it with an AI agent. Leave `drift -w` open in a split while an agent (Copilot, Claude, etc.) works, every edit lands on screen instantly. Press <kbd>
|
|
120
|
+
> Pair it with an AI agent. Leave `drift -w` open in a split while an agent (Copilot, Claude, etc.) works, every edit lands on screen instantly. Press <kbd>F</kbd> to freeze the view when you want to read, and again to resume.
|
|
121
121
|
|
|
122
122
|
Make it your default git diff pager:
|
|
123
123
|
|
|
@@ -141,6 +141,8 @@ Some flags worth knowing:
|
|
|
141
141
|
| `-C`, `--directory DIR` | Run as if started in `DIR` (worktrees, bare repos) |
|
|
142
142
|
| `-c`, `--config FILE` | Use a specific config file |
|
|
143
143
|
| `--no-syntax` | Turn off syntax highlighting for this run |
|
|
144
|
+
| `--no-commit-meta` | Collapse the commit metadata to just the commit line |
|
|
145
|
+
| `--wrap` / `--no-wrap` | Wrap long lines instead of scrolling horizontally |
|
|
144
146
|
| `-U`, `--context N` | Lines of context around each change |
|
|
145
147
|
| `--ignore-whitespace` | Ignore whitespace-only changes |
|
|
146
148
|
| `--diff-algorithm ALGO` | `myers`, `minimal`, `patience`, or `histogram` |
|
|
@@ -155,7 +157,7 @@ Some flags worth knowing:
|
|
|
155
157
|
| `0` `$` | Scroll to line start / end |
|
|
156
158
|
| `d` `u` / `^d` `^u` | Half page down / up |
|
|
157
159
|
| `space` `f` `^f` / `b` `^b` | Full page down / up |
|
|
158
|
-
| `^e` `^y` | Scroll one line down / up |
|
|
160
|
+
| `e` `y` / `^e` `^y` | Scroll one line down / up |
|
|
159
161
|
| `g` `G` | Top / bottom |
|
|
160
162
|
| `H` `M` `L` | Cursor to screen top / middle / bottom |
|
|
161
163
|
| `{` `}` | Previous / next hunk |
|
|
@@ -163,14 +165,16 @@ Some flags worth knowing:
|
|
|
163
165
|
| `/` | Search the current file (regex, smart-case) |
|
|
164
166
|
| `n` `N` | Next / previous match |
|
|
165
167
|
| `s` | Toggle split view |
|
|
166
|
-
| `
|
|
168
|
+
| `w` | Toggle line wrapping (long lines wrap instead of scrolling horizontally) |
|
|
169
|
+
| `S` | File stats modal |
|
|
167
170
|
| `B` | Toggle the file sidebar |
|
|
168
|
-
| `
|
|
171
|
+
| `F` | Toggle watch mode (follow changes, like `less`) |
|
|
172
|
+
| `a` | Toggle untracked files (worktree view) |
|
|
169
173
|
| `V` | Start / cancel a line selection; any motion key extends it |
|
|
170
|
-
| `
|
|
171
|
-
| `
|
|
172
|
-
| `enter` |
|
|
173
|
-
| `
|
|
174
|
+
| `c` | Copy the selection, or the cursor line when nothing is selected |
|
|
175
|
+
| `C` | Copy the whole current file |
|
|
176
|
+
| `enter` | On a hunk header, expand folded context; on the commit line, expand / collapse the commit metadata |
|
|
177
|
+
| `o` | Open the current file in `$EDITOR` |
|
|
174
178
|
| `r` | Refresh |
|
|
175
179
|
| `?` | Toggle the help footer |
|
|
176
180
|
| `q` | Quit |
|
|
@@ -185,6 +189,8 @@ drift is fully mouse-driven too:
|
|
|
185
189
|
- Drag the sidebar's divider to resize it, live.
|
|
186
190
|
- In split view, drag the divider between the two panes to rebalance them.
|
|
187
191
|
- Click the `? help` badge in the status bar to toggle the help footer.
|
|
192
|
+
- Double-click the commit line to expand or collapse the commit metadata; on a
|
|
193
|
+
hunk header, double-click expands the folded context.
|
|
188
194
|
- Drag across the diff to select text; it lands on your system clipboard (over
|
|
189
195
|
SSH too, via OSC 52). In split view the selection stays within one pane, so
|
|
190
196
|
you copy just the old or just the new side.
|
|
@@ -241,6 +247,12 @@ theme = "onedark" # any built-in or syntect theme name
|
|
|
241
247
|
syntax = true # highlight diff content
|
|
242
248
|
intraline = true # word-level change emphasis
|
|
243
249
|
line-numbers = true # old/new line-number gutter
|
|
250
|
+
commit-meta = true # expand author/date/message; the commit line always shows for a single commit
|
|
251
|
+
wrap = false # wrap long lines instead of scrolling horizontally (toggle with w)
|
|
252
|
+
wrap-symbol = "↪" # symbol shown at the start of each wrapped continuation line
|
|
253
|
+
expand-symbol = "›" # gutter symbol on the collapsed commit line (expand to show metadata)
|
|
254
|
+
collapse-symbol = "⌄" # gutter symbol on the expanded commit line (collapse to hide metadata)
|
|
255
|
+
context-symbol = "⋯" # gutter symbol on a hunk header (reveal more context)
|
|
244
256
|
tab-width = 4
|
|
245
257
|
editor = "" # falls back to $VISUAL, then $EDITOR, then vi
|
|
246
258
|
sidebar = "auto" # "auto" (opens at width >= 150), "always", or "never"
|