Debian Codegraph @

manual/src/full---help-output.md

raw symbols SCIP
1 # Full --help output
2
3 ```txt
4 A viewer for git and diff output
5
6 Usage: delta [OPTIONS] [MINUS_FILE] [PLUS_FILE]
7
8 Arguments:
9 [MINUS_FILE]
10 First file to be compared when delta is being used to diff two
11 files.
12
13 `delta file1 file2` is equivalent to `diff -u file1 file2 | delta`.
14
15 [PLUS_FILE]
16 Second file to be compared when delta is being used to diff two
17 files
18
19 Options:
20 --blame-code-style <STYLE>
21 Style string for the code section of a git blame line.
22
23 By default the code will be syntax-highlighted with the same
24 background color as the blame format section of the line (the
25 background color is determined by blame-palette). E.g. setting this
26 option to 'syntax' will syntax-highlight the code with no
27 background color.
28
29 --blame-format <FMT>
30 Format string for git blame commit metadata.
31
32 Available placeholders are "{timestamp}", "{author}", and
33 "{commit}".
34
35 [default: "{timestamp:<15} {author:<15.14} {commit:<8}"]
36
37 --blame-palette <COLORS>
38 Background colors used for git blame lines (space-separated
39 string).
40
41 Lines added by the same commit are painted with the same color;
42 colors are recycled as needed.
43
44 --blame-separator-format <FMT>
45 Separator between the blame format and the code section of a git
46 blame line.
47
48 Contains the line number by default. Possible values are "none" to
49 disable line numbers or a format string. This may contain one
50 "{n:}" placeholder and will display the line number on every line.
51 A type may be added after all other format specifiers and can be
52 separated by '_': If type is set to 'block' (e.g. "{n:^4_block}")
53 the line number will only be shown when a new blame block starts;
54 or if it is set to 'every-N' the line will be show with every block
55 and every N-th (modulo) line.
56
57 [default: │{n:^4}│]
58
59 --blame-separator-style <STYLE>
60 Style string for the blame-separator-format
61
62 --blame-timestamp-format <FMT>
63 Format of `git blame` timestamp in raw git output received by delta
64
65 [default: "%Y-%m-%d %H:%M:%S %z"]
66
67 --blame-timestamp-output-format <FMT>
68 Format string for git blame timestamp output.
69
70 This string is used for formatting the timestamps in git blame
71 output. It must follow the `strftime` format syntax specification.
72 If it is not present, the timestamps will be formatted in a
73 human-friendly but possibly less accurate form.
74
75 See:
76 <https://docs.rs/chrono/latest/chrono/format/strftime/index.html>
77
78 --color-only
79 Do not alter the input structurally in any way.
80
81 But color and highlight hunk lines according to your delta
82 configuration. This is mainly intended for other tools that use
83 delta.
84
85 --config <PATH>
86 Load the config file at PATH instead of ~/.gitconfig
87
88 [default: ""]
89
90 --commit-decoration-style <STYLE>
91 Style string for the commit hash decoration.
92
93 See STYLES section. The style string should contain one of the
94 special attributes 'box', 'ul' (underline), 'ol' (overline), or the
95 combination 'ul ol'.
96
97 [default: ""]
98
99 --commit-regex <REGEX>
100 Regular expression used to identify the commit line when parsing
101 git output
102
103 [default: "^commit "]
104
105 --commit-style <STYLE>
106 Style string for the commit hash line.
107
108 See STYLES section. The style 'omit' can be used to remove the
109 commit hash line from the output.
110
111 [default: raw]
112
113 --dark
114 Use default colors appropriate for a dark terminal background.
115
116 For more control, see the style options and --syntax-theme.
117
118 --default-language <LANG>
119 Default language used for syntax highlighting.
120
121 Used as a fallback when the language cannot be inferred from a
122 filename. It will typically make sense to set this in the
123 per-repository config file '.git/config'.
124
125 [default: txt]
126
127 --detect-dark-light <DETECT_DARK_LIGHT>
128 Detect whether or not the terminal is dark or light by querying for
129 its colors.
130
131 Ignored if either `--dark` or `--light` is specified.
132
133 Querying the terminal for its colors requires "exclusive" access
134 since delta reads/writes from the terminal and enables/disables raw
135 mode. This causes race conditions with pagers such as less when
136 they are attached to the same terminal as delta.
137
138 This is usually only an issue when the output is manually piped to
139 a pager. For example: `git diff | delta | less`. Otherwise, if
140 delta starts the pager itself, then there's no race condition since
141 the pager is started *after* the color is detected.
142
143 `auto` tries to account for these situations by testing if the
144 output is redirected.
145
146 The `--color-only` option is treated as an indicator that delta is
147 used as `interactive.diffFilter`. In this case the color is queried
148 from the terminal even though the output is redirected.
149
150 Possible values:
151 - auto: Only query the terminal for its colors if the output is
152 not redirected
153 - always: Always query the terminal for its colors
154 - never: Never query the terminal for its colors
155
156 [default: auto]
157
158 -@, --diff-args <STRING>
159 Extra arguments to pass to `git diff` when using delta to diff two
160 files.
161
162 E.g. `delta --diff-args=-U999 file_1 file_2` is equivalent to `git
163 diff --no-index --color -U999 file_1 file_2 | delta`.
164
165 If you use process substitution (`delta <(command_1) <(command_2)`)
166 and your git version doesn't support it, then delta will fall back
167 to `diff` instead of `git diff`.
168
169 [default: ""]
170
171 --diff-highlight
172 Emulate diff-highlight.
173
174 <https://github.com/git/git/tree/master/contrib/diff-highlight>
175
176 --diff-so-fancy
177 Emulate diff-so-fancy.
178
179 <https://github.com/so-fancy/diff-so-fancy>
180
181 --diff-stat-align-width <N>
182 Width allocated for file paths in a diff stat section.
183
184 If a relativized file path exceeds this width then the diff stat
185 will be misaligned.
186
187 [default: 48]
188
189 --features <FEATURES>
190 Names of delta features to activate (space-separated).
191
192 A feature is a named collection of delta options in ~/.gitconfig.
193 See FEATURES section. The environment variable DELTA_FEATURES can
194 be set to a space-separated list of feature names. If this is
195 preceded with a + character, the features from the environment
196 variable will be added to those specified in git config. E.g.
197 DELTA_FEATURES=+side-by-side can be used to activate side-by-side
198 temporarily (use DELTA_FEATURES=+ to go back to just the features
199 from git config).
200
201 --file-added-label <STRING>
202 Text to display before an added file path.
203
204 Used in the default value of navigate-regex.
205
206 [default: added:]
207
208 --file-copied-label <STRING>
209 Text to display before a copied file path
210
211 [default: copied:]
212
213 --file-decoration-style <STYLE>
214 Style string for the file decoration.
215
216 See STYLES section. The style string should contain one of the
217 special attributes 'box', 'ul' (underline), 'ol' (overline), or the
218 combination 'ul ol'.
219
220 [default: "blue ul"]
221
222 --file-modified-label <STRING>
223 Text to display before a modified file path.
224
225 Used in the default value of navigate-regex.
226
227 [default: ""]
228
229 --file-removed-label <STRING>
230 Text to display before a removed file path.
231
232 Used in the default value of navigate-regex.
233
234 [default: removed:]
235
236 --file-renamed-label <STRING>
237 Text to display before a renamed file path.
238
239 Used in the default value of navigate-regex.
240
241 [default: renamed:]
242
243 --file-style <STYLE>
244 Style string for the file section.
245
246 See STYLES section. The style 'omit' can be used to remove the file
247 section from the output.
248
249 [default: blue]
250
251 --file-transformation <SED_CMD>
252 Sed-style command transforming file paths for display
253
254 --generate-completion <GENERATE_COMPLETION>
255 Print completion file for the given shell
256
257 [possible values: bash, elvish, fish, powershell, zsh]
258
259 --grep-context-line-style <STYLE>
260 Style string for non-matching lines of grep output.
261
262 See STYLES section. Defaults to zero-style.
263
264 --grep-file-style <STYLE>
265 Style string for file paths in grep output.
266
267 See STYLES section.
268
269 [default: magenta]
270
271 --grep-header-decoration-style <STYLE>
272 Style string for the header decoration in grep output.
273
274 Default is "none" when grep-output-type-is "ripgrep", otherwise
275 defaults to value of header-decoration-style. See
276 hunk-header-decoration-style.
277
278 --grep-header-file-style <STYLE>
279 Style string for the file path part of the header in grep output.
280
281 See hunk_header_file_style.
282
283 --grep-line-number-style <STYLE>
284 Style string for line numbers in grep output.
285
286 See STYLES section.
287
288 [default: green]
289
290 --grep-output-type <OUTPUT_TYPE>
291 Grep output format. Possible values: "ripgrep" - file name printed
292 once, followed by matching lines within that file, each preceded by
293 a line number. "classic" - file name:line number, followed by
294 matching line. Default is "ripgrep" if `rg --json` format is
295 detected, otherwise "classic"
296
297 [possible values: ripgrep, classic]
298
299 --grep-match-line-style <STYLE>
300 Style string for matching lines of grep output.
301
302 See STYLES section. Defaults to plus-style.
303
304 --grep-match-word-style <STYLE>
305 Style string for the matching substrings within a matching line of
306 grep output.
307
308 See STYLES section. Defaults to plus-style.
309
310 --grep-separator-symbol <STRING>
311 Separator symbol printed after the file path and line number in
312 grep output.
313
314 Defaults to ":" for both match and context lines, since many
315 terminal emulators recognize constructs like "/path/to/file:7:".
316 However, standard grep output uses "-" for context lines: set this
317 option to "keep" to keep the original separator symbols.
318
319 [default: :]
320
321 --hunk-header-decoration-style <STYLE>
322 Style string for the hunk-header decoration.
323
324 See STYLES section. The style string should contain one of the
325 special attributes 'box', 'ul' (underline), 'ol' (overline), or the
326 combination 'ul ol'.
327
328 [default: "blue box"]
329
330 --hunk-header-file-style <STYLE>
331 Style string for the file path part of the hunk-header.
332
333 See STYLES section. The file path will only be displayed if
334 hunk-header-style contains the 'file' special attribute.
335
336 [default: blue]
337
338 --hunk-header-line-number-style <STYLE>
339 Style string for the line number part of the hunk-header.
340
341 See STYLES section. The line number will only be displayed if
342 hunk-header-style contains the 'line-number' special attribute.
343
344 [default: blue]
345
346 --hunk-header-style <STYLE>
347 Style string for the hunk-header.
348
349 See STYLES section. Special attributes 'file' and 'line-number' can
350 be used to include the file path, and number of first hunk line, in
351 the hunk header. The style 'omit' can be used to remove the hunk
352 header section from the output.
353
354 [default: "line-number syntax"]
355
356 --hunk-label <STRING>
357 Text to display before a hunk header.
358
359 Used in the default value of navigate-regex.
360
361 [default: ""]
362
363 --hyperlinks
364 Render commit hashes, file names, and line numbers as hyperlinks.
365
366 Following the hyperlink spec for terminal emulators:
367 <https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda>.
368 By default, file names and line numbers link to the local file
369 using a file URL, whereas commit hashes link to the commit in
370 GitHub, if the remote repository is hosted by GitHub. See
371 --hyperlinks-file-link-format for full control over the file URLs
372 emitted. Hyperlinks are supported by several common terminal
373 emulators. To make them work, you must use less version >= 581 with
374 the -R flag (or use -r with older less versions, but this will
375 break e.g. --navigate). If you use tmux, then you will also need a
376 patched fork of tmux (see <https://github.com/dandavison/tmux>).
377
378 --hyperlinks-commit-link-format <FMT>
379 Format string for commit hyperlinks (requires --hyperlinks).
380
381 The placeholder "{commit}" will be replaced by the commit hash. For
382 example:
383 --hyperlinks-commit-link-format='https://mygitrepo/{commit}/'
384
385 --hyperlinks-file-link-format <FMT>
386 Format string for file hyperlinks (requires --hyperlinks).
387
388 Placeholders "{path}" and "{line}" will be replaced by the absolute
389 file path and the line number; "{host}" with the hostname delta is
390 currently running on. The default is to create a hyperlink
391 containing a standard file URI with only the filename, which your
392 terminal or OS should handle. You can specify any scheme, such as
393 "file-line://{path}:{line}" and register an application to handle
394 it. See <https://dandavison.github.io/delta/hyperlinks.html> for
395 details.
396
397 [default: file://{path}]
398
399 --inline-hint-style <STYLE>
400 Style string for short inline hint text.
401
402 This styles certain content added by delta to the original diff
403 such as special characters to highlight tabs, and the symbols used
404 to indicate wrapped lines. See STYLES section.
405
406 [default: blue]
407
408 --inspect-raw-lines <true|false>
409 Kill-switch for --color-moved support.
410
411 Whether to examine ANSI color escape sequences in raw lines
412 received from Git and handle lines colored in certain ways
413 specially. This is on by default: it is how Delta supports Git's
414 --color-moved feature. Set this to "false" to disable this
415 behavior.
416
417 [default: true]
418 [possible values: true, false]
419
420 --keep-plus-minus-markers
421 Prefix added/removed lines with a +/- character, as git does.
422
423 By default, delta does not emit any prefix, so code can be copied
424 directly from delta's output.
425
426 --light
427 Use default colors appropriate for a light terminal background.
428
429 For more control, see the style options and --syntax-theme.
430
431 --line-buffer-size <N>
432 Size of internal line buffer.
433
434 Delta compares the added and removed versions of nearby lines in
435 order to detect and highlight changes at the level of individual
436 words/tokens. Therefore, nearby lines must be buffered internally
437 before they are painted and emitted. Increasing this value might
438 improve highlighting of some large diff hunks. However, setting
439 this to a high value will adversely affect delta's performance when
440 entire files are added/removed.
441
442 [default: 32]
443
444 --line-fill-method <STRING>
445 Line-fill method in side-by-side mode.
446
447 How to extend the background color to the end of the line in
448 side-by-side mode. Can be ansi (default) or spaces (default if
449 output is not to a terminal). Has no effect if --width=variable is
450 given.
451
452 [possible values: ansi, spaces]
453
454 -n, --line-numbers
455 Display line numbers next to the diff.
456
457 See LINE NUMBERS section.
458
459 --line-numbers-left-format <FMT>
460 Format string for the left column of line numbers.
461
462 A typical value would be "{nm:^4}⋮" which means to display the line
463 numbers of the minus file (old version), center-aligned, padded to
464 a width of 4 characters, followed by a dividing character. See the
465 LINE NUMBERS section.
466
467 [default: {nm:^4}⋮]
468
469 --line-numbers-left-style <STYLE>
470 Style string for the left column of line numbers.
471
472 See STYLES and LINE NUMBERS sections.
473
474 [default: auto]
475
476 --line-numbers-minus-style <STYLE>
477 Style string for line numbers in the old (minus) version of the
478 file.
479
480 See STYLES and LINE NUMBERS sections.
481
482 [default: auto]
483
484 --line-numbers-plus-style <STYLE>
485 Style string for line numbers in the new (plus) version of the
486 file.
487
488 See STYLES and LINE NUMBERS sections.
489
490 [default: auto]
491
492 --line-numbers-right-format <FMT>
493 Format string for the right column of line numbers.
494
495 A typical value would be "{np:^4}│ " which means to display the
496 line numbers of the plus file (new version), center-aligned, padded
497 to a width of 4 characters, followed by a dividing character, and a
498 space. See the LINE NUMBERS section.
499
500 [default: {np:^4}│]
501
502 --line-numbers-right-style <STYLE>
503 Style string for the right column of line numbers.
504
505 See STYLES and LINE NUMBERS sections.
506
507 [default: auto]
508
509 --line-numbers-zero-style <STYLE>
510 Style string for line numbers in unchanged (zero) lines.
511
512 See STYLES and LINE NUMBERS sections.
513
514 [default: auto]
515
516 --list-languages
517 List supported languages and associated file extensions
518
519 --list-syntax-themes
520 List available syntax-highlighting color themes
521
522 --map-styles <STYLES_MAP>
523 Map styles encountered in raw input to desired output styles.
524
525 An example is --map-styles='bold purple => red "#eeeeee", bold cyan
526 => syntax "#eeeeee"'
527
528 --max-line-distance <DIST>
529 Maximum line pair distance parameter in within-line diff algorithm.
530
531 This parameter is the maximum distance (0.0 - 1.0) between two
532 lines for them to be inferred to be homologous. Homologous line
533 pairs are highlighted according to the deletion and insertion
534 operations transforming one into the other.
535
536 [default: 0.6]
537
538 --max-syntax-highlighting-length <N>
539 Stop syntax highlighting lines after this many characters.
540
541 To always highlight entire lines, set to zero - but note that delta
542 will be slow on very long lines (e.g. minified .js).
543
544 [default: 400]
545
546 --max-line-length <N>
547 Truncate lines longer than this.
548
549 To prevent any truncation, set to zero. When wrapping lines this
550 does nothing as it is overwritten to fit at least all visible
551 characters, see `--wrap-max-lines`.
552
553 [default: 3000]
554
555 --merge-conflict-begin-symbol <STRING>
556 String marking the beginning of a merge conflict region.
557
558 The string will be repeated until it reaches the required length.
559
560 [default: ▼]
561
562 --merge-conflict-end-symbol <STRING>
563 String marking the end of a merge conflict region.
564
565 The string will be repeated until it reaches the required length.
566
567 [default: ▲]
568
569 --merge-conflict-ours-diff-header-decoration-style <STYLE>
570 Style string for the decoration of the header above the 'ours'
571 merge conflict diff.
572
573 This styles the decoration of the header above the diff between the
574 ancestral commit and the 'ours' branch. See STYLES section. The
575 style string should contain one of the special attributes 'box',
576 'ul' (underline), 'ol' (overline), or the combination 'ul ol'.
577
578 [default: box]
579
580 --merge-conflict-ours-diff-header-style <STYLE>
581 Style string for the header above the 'ours' branch merge conflict
582 diff.
583
584 See STYLES section.
585
586 [default: normal]
587
588 --merge-conflict-theirs-diff-header-decoration-style <STYLE>
589 Style string for the decoration of the header above the 'theirs'
590 merge conflict diff.
591
592 This styles the decoration of the header above the diff between the
593 ancestral commit and 'their' branch. See STYLES section. The style
594 string should contain one of the special attributes 'box', 'ul'
595 (underline), 'ol' (overline), or the combination 'ul ol'.
596
597 [default: box]
598
599 --merge-conflict-theirs-diff-header-style <STYLE>
600 Style string for the header above the 'theirs' branch merge
601 conflict diff.
602
603 This styles the header above the diff between the ancestral commit
604 and 'their' branch. See STYLES section.
605
606 [default: normal]
607
608 --minus-empty-line-marker-style <STYLE>
609 Style string for removed empty line marker.
610
611 Used only if --minus-style has no background color.
612
613 [default: "normal auto"]
614
615 --minus-emph-style <STYLE>
616 Style string for emphasized sections of removed lines.
617
618 See STYLES section.
619
620 [default: "normal auto"]
621
622 --minus-non-emph-style <STYLE>
623 Style string for non-emphasized sections of removed lines that have
624 an emphasized section.
625
626 See STYLES section.
627
628 [default: minus-style]
629
630 --minus-style <STYLE>
631 Style string for removed lines.
632
633 See STYLES section.
634
635 [default: "normal auto"]
636
637 --navigate
638 Activate diff navigation.
639
640 Use n to jump forwards and N to jump backwards. To change the file
641 labels used see --file-added-label, --file-copied-label,
642 --file-modified-label, --file-removed-label, --file-renamed-label.
643
644 --navigate-regex <REGEX>
645 Regular expression defining navigation stop points
646
647 --no-gitconfig
648 Do not read any settings from git config.
649
650 See GIT CONFIG section.
651
652 --pager <CMD>
653 Which pager to use.
654
655 The default pager is `less`. You can also change pager by setting
656 the environment variable DELTA_PAGER, or PAGER. This option
657 overrides these environment variables.
658
659 --paging <auto|always|never>
660 Whether to use a pager when displaying output.
661
662 Options are: auto, always, and never.
663
664 [default: auto]
665 [possible values: auto, always, never]
666
667 --parse-ansi
668 Display ANSI color escape sequences in human-readable form.
669
670 Example usage: git show --color=always | delta --parse-ansi This
671 can be used to help identify input style strings to use with
672 map-styles.
673
674 --plus-emph-style <STYLE>
675 Style string for emphasized sections of added lines.
676
677 See STYLES section.
678
679 [default: "syntax auto"]
680
681 --plus-empty-line-marker-style <STYLE>
682 Style string for added empty line marker.
683
684 Used only if --plus-style has no background color.
685
686 [default: "normal auto"]
687
688 --plus-non-emph-style <STYLE>
689 Style string for non-emphasized sections of added lines that have
690 an emphasized section.
691
692 See STYLES section.
693
694 [default: plus-style]
695
696 --plus-style <STYLE>
697 Style string for added lines.
698
699 See STYLES section.
700
701 [default: "syntax auto"]
702
703 --raw
704 Do not alter the input in any way.
705
706 This is mainly intended for testing delta.
707
708 --relative-paths
709 Output all file paths relative to the current directory.
710
711 This means that they will resolve correctly when clicked on or used
712 in shell commands.
713
714 --right-arrow <STRING>
715 Text to display with a changed file path.
716
717 For example, a unified diff heading, a rename, or a chmod.
718
719 [default: "⟶ "]
720
721 --show-colors
722 Show available named colors.
723
724 In addition to named colors, arbitrary colors can be specified
725 using RGB hex codes. See COLORS section.
726
727 --show-config
728 Display the active values for all Delta options.
729
730 Style string options are displayed with foreground and background
731 colors. This can be used to experiment with colors by combining
732 this option with other options such as --minus-style, --zero-style,
733 --plus-style, --light, --dark, etc.
734
735 --show-syntax-themes
736 Show example diff for available syntax-highlighting themes.
737
738 If diff output is supplied on standard input then this will be used
739 for the demo. For example: `git show | delta --show-syntax-themes`.
740
741 --show-themes
742 Show example diff for available delta themes.
743
744 A delta theme is a delta named feature (see --features) that sets
745 either `light` or `dark`. See
746 <https://github.com/dandavison/delta#custom-color-themes>. If diff
747 output is supplied on standard input then this will be used for the
748 demo. For example: `git show | delta --show-themes`. By default
749 shows dark or light themes only, according to whether delta is in
750 dark or light mode (as set by the user or inferred from BAT_THEME).
751 To control the themes shown, use --dark or --light, or both, on the
752 command line together with this option.
753
754 -s, --side-by-side
755 Display diffs in side-by-side layout
756
757 --syntax-theme <SYNTAX_THEME>
758 The syntax-highlighting theme to use.
759
760 Use --show-syntax-themes to demo available themes. Defaults to the
761 value of the BAT_THEME environment variable, if that contains a
762 valid theme name. --syntax-theme=none disables all syntax
763 highlighting.
764
765 --tabs <N>
766 The number of spaces to replace tab characters with.
767
768 Use --tabs=0 to pass tab characters through directly, but note that
769 in that case delta will calculate line widths assuming tabs occupy
770 one character's width on the screen: if your terminal renders tabs
771 as more than one character wide then delta's output will look
772 incorrect.
773
774 [default: 8]
775
776 --true-color <auto|always|never>
777 Whether to emit 24-bit ("true color") RGB color codes.
778
779 Options are auto, always, and never. "auto" means that delta will
780 emit 24-bit color codes if the environment variable COLORTERM has
781 the value "truecolor" or "24bit". If your terminal application (the
782 application you use to enter commands at a shell prompt) supports
783 24 bit colors, then it probably already sets this environment
784 variable, in which case you don't need to do anything.
785
786 [default: auto]
787 [possible values: auto, always, never]
788
789 --whitespace-error-style <STYLE>
790 Style string for whitespace errors.
791
792 Defaults to color.diff.whitespace if that is set in git config, or
793 else 'magenta reverse'.
794
795 [default: "auto auto"]
796
797 -w, --width <N>
798 The width of underline/overline decorations.
799
800 Examples: "72" (exactly 72 characters), "-2" (auto-detected
801 terminal width minus 2). An expression such as "74-2" is also valid
802 (equivalent to 72 but may be useful if the caller has a variable
803 holding the value "74"). Use --width=variable to extend decorations
804 and background colors to the end of the text only. Otherwise
805 background colors extend to the full terminal width.
806
807 --word-diff-regex <REGEX>
808 Regular expression defining a 'word' in within-line diff algorithm.
809
810 The regular expression used to decide what a word is for the
811 within-line highlight algorithm. For less fine-grained matching
812 than the default try --word-diff-regex="\S+"
813 --max-line-distance=1.0 (this is more similar to `git
814 --word-diff`).
815
816 [default: \w+]
817
818 --wrap-left-symbol <STRING>
819 End-of-line wrapped content symbol (left-aligned).
820
821 Symbol added to the end of a line indicating that the content has
822 been wrapped onto the next line and continues left-aligned.
823
824 [default: ↵]
825
826 --wrap-max-lines <N>
827 How often a line should be wrapped if it does not fit.
828
829 Zero means to never wrap. Any content which does not fit after
830 wrapping will be truncated. A value of "unlimited" means a line
831 will be wrapped as many times as required.
832
833 [default: 2]
834
835 --wrap-right-percent <PERCENT>
836 Threshold for right-aligning wrapped content.
837
838 If the length of the remaining wrapped content, as a percentage of
839 width, is less than this quantity it will be right-aligned.
840 Otherwise it will be left-aligned.
841
842 [default: 37.0]
843
844 --wrap-right-prefix-symbol <STRING>
845 Pre-wrapped content symbol (right-aligned).
846
847 Symbol displayed before right-aligned wrapped content.
848
849 [default: …]
850
851 --wrap-right-symbol <STRING>
852 End-of-line wrapped content symbol (right-aligned).
853
854 Symbol added to the end of a line indicating that the content has
855 been wrapped onto the next line and continues right-aligned.
856
857 [default: ↴]
858
859 --zero-style <STYLE>
860 Style string for unchanged lines.
861
862 See STYLES section.
863
864 [default: "syntax normal"]
865
866 --24-bit-color <auto|always|never>
867 Deprecated: use --true-color
868
869 [possible values: auto, always, never]
870
871 -h, --help
872 Print help (see a summary with '-h')
873
874 -V, --version
875 Print version
876
877
878 Git config
879
880 By default, delta takes settings from a section named "delta" in git config
881 files, if one is present. The git config file to use for delta options will
882 usually be ~/.gitconfig, but delta follows the rules given in
883 <https://git-scm.com/docs/git-config#FILES>. Most delta options can be
884 given in a git config file, using the usual option names but without the
885 initial '--'. An example is
886
887 [delta]
888 line-numbers = true
889 zero-style = dim syntax
890
891
892 Features
893
894 A feature is a named collection of delta options in git config. An example
895 is:
896
897 [delta "my-delta-feature"]
898 syntax-theme = Dracula
899 plus-style = bold syntax "#002800"
900
901 To activate those options, you would use:
902
903 delta --features my-delta-feature
904
905 A feature name may not contain whitespace. You can activate multiple
906 features:
907
908 [delta]
909 features = my-highlight-styles-colors-feature my-line-number-styles-feature
910
911 If more than one feature sets the same option, the last one wins.
912
913 If an option is present in the [delta] section, then features are not
914 considered at all.
915
916 If you want an option to be fully overridable by a feature and also have a
917 non default value when no features are used, then you need to define a
918 "default" feature and include it in the main delta configuration.
919
920 For instance:
921
922 [delta]
923 feature = default-feature
924
925 [delta "default-feature"]
926 width = 123
927
928 At this point, you can override features set in the command line or in the
929 environment variables and the "last one wins" rules will apply as expected.
930
931
932 Styles
933
934 All options that have a name like --*-style work the same way. It is very
935 similar to how colors/styles are specified in a gitconfig file:
936 <https://git-scm.com/docs/git-config#Documentation/git-config.txt-color>
937
938 Here is an example:
939
940 --minus-style 'red bold ul "#ffeeee"'
941
942 That means: For removed lines, set the foreground (text) color to 'red',
943 make it bold and underlined, and set the background color to '#ffeeee'.
944
945 See the Colors section below for how to specify a color. In addition to
946 real colors, there are 4 special color names: 'auto', 'normal', 'raw', and
947 'syntax'.
948
949 Here is an example of using special color names together with a single
950 attribute:
951
952 --minus-style 'syntax bold auto'
953
954 That means: For removed lines, syntax-highlight the text, and make it bold,
955 and do whatever delta normally does for the background.
956
957 The available attributes are: 'blink', 'bold', 'dim', 'hidden', 'italic',
958 'reverse', 'strike', and 'ul' (or 'underline').
959
960 The attribute 'omit' is supported by commit-style, file-style, and
961 hunk-header-style, meaning to remove the element entirely from the output.
962
963 A complete description of the style string syntax follows:
964
965 - If the input that delta is receiving already has colors, and you want
966 delta to output those colors unchanged, then use the special style string
967 'raw'. Otherwise, delta will strip any colors from its input.
968
969 - A style string consists of 0, 1, or 2 colors, together with an arbitrary
970 number of style attributes, all separated by spaces.
971
972 - The first color is the foreground (text) color. The second color is the
973 background color. Attributes can go in any position.
974
975 - This means that in order to specify a background color you must also
976 specify a foreground (text) color.
977
978 - If you want delta to choose one of the colors automatically, then use the
979 special color 'auto'. This can be used for both foreground and
980 background.
981
982 - If you want the foreground/background color to be your terminal's
983 foreground/background color, then use the special color 'normal'.
984
985 - If you want the foreground text to be syntax-highlighted according to its
986 language, then use the special foreground color 'syntax'. This can only
987 be used for the foreground (text).
988
989 - The minimal style specification is the empty string ''. This means: do
990 not apply any colors or styling to the element in question.
991
992
993 Colors
994
995 There are four ways to specify a color (this section applies to foreground
996 and background colors within a style string):
997
998 1. CSS color name
999
1000 Any of the 140 color names used in CSS:
1001 <https://www.w3schools.com/colors/colors_groups.asp>
1002
1003 2. RGB hex code
1004
1005 An example of using an RGB hex code is:
1006 --file-style="#0e7c0e"
1007
1008 3. ANSI color name
1009
1010 There are 8 ANSI color names:
1011 black, red, green, yellow, blue, magenta, cyan, white.
1012
1013 In addition, all of them have a bright form:
1014 brightblack, brightred, brightgreen, brightyellow, brightblue,
1015 brightmagenta, brightcyan, brightwhite.
1016
1017 An example of using an ANSI color name is:
1018 --file-style="green"
1019
1020 Unlike RGB hex codes, ANSI color names are just names: you can choose
1021 the exact color that each name corresponds to in the settings of your
1022 terminal application (the application you use to enter commands at a
1023 shell prompt). This means that if you use ANSI color names, and you
1024 change the color theme used by your terminal, then delta's colors will
1025 respond automatically, without needing to change the delta command line.
1026
1027 "purple" is accepted as a synonym for "magenta". Color names and codes
1028 are case-insensitive.
1029
1030 4. ANSI color number
1031
1032 An example of using an ANSI color number is:
1033 --file-style=28
1034
1035 There are 256 ANSI color numbers: 0-255. The first 16 are the same as
1036 the colors described in the "ANSI color name" section above. See
1037 <https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit>. Specifying
1038 colors like this is useful if your terminal only supports 256 colors
1039 (i.e. doesn't support 24-bit color).
1040
1041
1042 Line Numbers
1043
1044 To display line numbers, use --line-numbers.
1045
1046 Line numbers are displayed in two columns. Here's what it looks like by
1047 default:
1048
1049 1 ⋮ 1 │ unchanged line
1050 2 ⋮ │ removed line
1051 ⋮ 2 │ added line
1052
1053 In that output, the line numbers for the old (minus) version of the file
1054 appear in the left column, and the line numbers for the new (plus) version
1055 of the file appear in the right column. In an unchanged (zero) line, both
1056 columns contain a line number.
1057
1058 The following options allow the line number display to be customized:
1059
1060 --line-numbers-left-format: Change the contents of the left column
1061 --line-numbers-right-format: Change the contents of the right column
1062 --line-numbers-left-style: Change the style applied to the left column
1063 --line-numbers-right-style: Change the style applied to the right column
1064 --line-numbers-minus-style: Change the style applied to line numbers in
1065 minus lines
1066 --line-numbers-zero-style: Change the style applied to line numbers in
1067 unchanged lines
1068 --line-numbers-plus-style: Change the style applied to line numbers in
1069 plus lines
1070
1071 Options --line-numbers-left-format and --line-numbers-right-format allow
1072 you to change the contents of the line number columns. Their values are
1073 arbitrary format strings, which are allowed to contain the placeholders
1074 {nm} for the line number associated with the old version of the file and
1075 {np} for the line number associated with the new version of the file. The
1076 placeholders support a subset of the string formatting syntax documented
1077 here: <https://doc.rust-lang.org/std/fmt/#formatting-parameters>.
1078 Specifically, you can use the alignment and width syntax.
1079
1080 For example, the default value of --line-numbers-left-format is '{nm:^4}⋮'.
1081 This means that the left column should display the minus line number (nm),
1082 center-aligned, padded with spaces to a width of 4 characters, followed by
1083 a unicode dividing-line character (⋮).
1084
1085 Similarly, the default value of --line-numbers-right-format is '{np:^4}│'.
1086 This means that the right column should display the plus line number (np),
1087 center-aligned, padded with spaces to a width of 4 characters, followed by
1088 a unicode dividing-line character (│).
1089
1090 Use '<' for left-align, '^' for center-align, and '>' for right-align.
1091
1092
1093 Support
1094
1095 If something isn't working correctly, or you have a feature request, please
1096 open an issue at <https://github.com/dandavison/delta/issues>.
1097
1098 For a short help summary, please use delta -h.
1099 ```