1TIGRC(5)                          Tig Manual                          TIGRC(5)
2
3
4

NAME

6       tigrc - Tig configuration file
7

SYNOPSIS

9       set   variable = value
10       bind  keymap key action
11       color area fgcolor bgcolor [attributes]
12       source path
13
14

DESCRIPTION

16       You can permanently set an option by putting it in the ~/.tigrc file.
17       The file consists of a series of commands. Each line of the file may
18       contain only one command. Commands can span multiple lines if each line
19       is terminated by a backslash (\) character.
20
21       The hash mark (#) is used as a comment character. All text after the
22       comment character to the end of the line is ignored. You can use
23       comments to annotate your initialization file.
24
25       Certain options can be manipulated at runtime via the option menu. In
26       addition, options can also be toggled with the :toggle prompt command
27       or by entering the configuration command into the prompt.
28
29       In some environments, a user’s configuration will be stored in the
30       alternate location $XDG_CONFIG_HOME/tig/config. For brevity, this
31       document will refer only to ~/.tigrc.
32

GIT CONFIGURATION

34       Alternatively to using ~/.tigrc, Tig options can be set by putting them
35       in one of the Git configuration files, which are read by Tig on
36       startup. See git-config(1) for which files to use. The following
37       example show the basic syntax to use for settings, bindings and colors.
38
39           [tig] show-changes = true
40           [tig "color"] cursor = yellow red bold
41           [tig "bind"] generic = P parent
42
43
44       In addition to tig-specific options, the following Git options are read
45       from the Git configuration:
46
47       color.*
48           Colors for the various UI types. Can be configured via the
49           git-colors setting.
50
51       core.abbrev
52           The width of the commit ID. See also id-width option.
53
54       core.editor
55           The editor command. Can be overridden by setting TIG_EDITOR or
56           GIT_EDITOR.
57
58       core.worktree
59           The path to the root of the working tree.
60
61       gui.encoding
62           The encoding to use for displaying of file content.
63
64       i18n.commitencoding
65           The encoding used for commits. The default is UTF-8.
66

SET COMMAND

68       A few selective variables can be configured via the set command. The
69       syntax is:
70
71           set variables = value
72
73
74       Examples:
75
76           set commit-order = topo         # Order commits topologically
77           set git-colors = no             # Do not read Git's color settings.
78           set horizontal-scroll = 33%     # Scroll 33% of the view width
79           set blame-options = -C -C -C    # Blame lines from other files
80
81           # Wrap branch names with () and tags with <>
82           set reference-format = (branch) <tag>
83
84           # Configure blame view columns using command spanning multiple lines.
85           set blame-view = \
86                   date:default \
87                   author:abbreviated \
88                   file-name:auto \
89                   id:yes,color \
90                   line-number:yes,interval=5 text
91
92
93       Or in the Git configuration files:
94
95           [tig]
96                   line-graphics = no      # Disable graphics characters
97                   tab-size = 8            # Number of spaces per tab
98
99
100       The type of variables is either bool, int, string, or mixed.
101
102       Valid bool values
103           To set a bool variable to true use either "1", "true", or "yes".
104           Any other value will set the variable to false.
105
106       Valid int values
107           A non-negative integer.
108
109       Valid string values
110           A string of characters. Optionally, use either ' or " as
111           delimiters.
112
113       Valid mixed values
114           These values are composites of the above types. The valid values
115           are specified in the description.
116
117   Variables
118       The following variables can be set:
119
120       diff-options (string)
121           A space-separated string of diff options to use in the diff view.
122           git-show(1) is used for formatting and always passes
123           --patch-with-stat. Can control display of commit header metadata,
124           passing option --format. This option overrides any options
125           specified in the TIG_DIFF_OPTS environment variable (described in
126           tig(1)), but is itself overridden by diff flags given on the
127           command line invocation.
128
129       blame-options (string)
130           A space-separated string of default blame options. Can be used for
131           telling git-blame(1) how to detect the origin of lines. The options
132           are ignored when Tig is started in blame mode and given blame
133           options on the command line.
134
135       log-options (string)
136           A space-separated string of default options that should be passed
137           to the git-log(1) command used by the log view. Options can be
138           overridden by command line options. Used internally override custom
139           ‘pretty.format’ settings that break the log view.
140
141       main-options (string)
142           A space-separated string of default options that should be passed
143           to the git-log(1) command used by the main view. Options can be
144           overridden by command line options.
145
146       reference-format (string)
147           A space-separated string of format strings used for formatting
148           reference names. Wrap the name of the reference type with the
149           characters you would like to use for formatting, e.g.  [tag] and
150           <remote>. If no format is specified for local-tag, the format for
151           tag is used. Similarly, if no format is specified for
152           tracked-remote the remote format is used. Prefix with hide: to not
153           show that reference type, e.g.  hide:remote. Supported reference
154           types are:
155
156           •   head : The current HEAD.
157
158           •   tag : A signed tag.
159
160           •   local-tag : An unsigned tag.
161
162           •   remote : A remote.
163
164           •   tracked-remote : The remote tracked by current HEAD.
165
166           •   replace : A replaced reference.
167
168           •   branch : Any other reference.
169
170       line-graphics (mixed) [ascii|default|utf-8|auto|<bool>]
171           What type of character graphics for line drawing. "auto" means
172           "utf-8" if the locale is UTF-8, "default" otherwise.
173
174       truncation-delimiter (mixed) [utf-8|<string>]
175           A single character to draw where columns are truncated. The default
176           is "~". The special value "utf-8" refers to the character "..."
177           ("Midline Horizontal Ellipsis").
178
179       horizontal-scroll (mixed)
180           Interval to scroll horizontally in each step. Can be specified
181           either as the number of columns, e.g.  5, or as a percentage of the
182           view width, e.g.  33%, where the maximum is 100%. For percentages
183           it is always ensured that at least one column is scrolled. The
184           default is to scroll 50% of the view width.
185
186       git-colors (list)
187           A space-separated list of "key=value" pairs where the key is a Git
188           color name and the value is a Tig color name, e.g.
189           "branch.current=main-head" and "grep.filename=grep.file". Set to
190           "no" to disable.
191
192       show-notes (mixed) [<reference>|<bool>]
193           Whether to show notes for a commit. When set to a note reference
194           the reference is passed to git show --notes=. Notes are enabled by
195           default.
196
197       show-changes (bool)
198           Whether to show staged and unstaged changes in the main view.
199
200       show-untracked (bool)
201           Whether to show also untracked changes in the main view.
202
203       vertical-split (mixed) [auto|<bool>]
204           Whether to split the view horizontally or vertically. "auto" (which
205           is the default) means that it will depend on the window dimensions.
206           When true vertical orientation is used, and false sets the
207           orientation to horizontal.
208
209       split-view-height (mixed)
210           The height of the bottom view in a horizontally split display. Can
211           be specified either as the number of rows, e.g.  5, or as a
212           percentage of the view height, e.g.  80%, where the maximum is
213           100%. It is always ensured that the smaller of the views is at
214           least four rows high. The default is 67%.
215
216       split-view-width (mixed)
217           Width of the right-most view in a vertically split display. Can be
218           specified either as the number of column, e.g.  5, or as a
219           percentage of the view width, e.g.  80%, where the maximum is 100%.
220           It is always ensured that the smaller of the views is at least four
221           columns wide. The default is 50%.
222
223       status-show-untracked-dirs (bool)
224           Show untracked directories contents in the status view (analog to
225           git ls-files --directory option). On by default.
226
227       status-show-untracked-files (bool)
228           Show untracked files in the status view (mirrors Git’s
229           status.showUntrackedFiles option). On by default.
230
231       tab-size (int)
232           Number of spaces per tab. The default is 8 spaces.
233
234       diff-context (int)
235           Number of context lines to show for diffs.
236
237       diff-highlight (mixed)
238           Whether to highlight diffs using Git’s diff-highlight program.
239           Defaults to false. When set to true then diff-highlight is used,
240           else the option value is used as the path. When this option is in
241           effect, highlighted regions are governed by color
242           diff-add-highlight and color diff-del-highlight.
243
244       ignore-space (mixed) [no|all|some|at-eol|<bool>]
245           Ignore space changes in diff view. By default no space changes are
246           ignored. Changing this to "all", "some" or "at-eol" is equivalent
247           to passing "--ignore-all-space", "--ignore-space" or
248           "--ignore-space-at-eol" respectively to git diff or git show.
249
250
251           Warning: when ignore-space is set to some, all or at-eol, then the
252           status-update and status-revert may fail when updating or reverting
253           chunks containing lines with space changes. Similarly,
254           stage-update-line may fail when updating a line adjacent to a line
255           with space changes
256
257       commit-order (enum) [auto|default|topo|date|author-date|reverse]
258           Commit ordering using the default (chronological reverse) order,
259           topological order, date order or reverse order. When set to "auto"
260           (which is the default), topological order is automatically used in
261           the main view when the commit graph is enabled. In repositories
262           with a long commit history it is advised to set this option to
263           "default" to speed up loading of the main view.
264
265       ignore-case (enum) [no|yes|smart-case]
266           Ignore case in searches. "smart-case" ignores case if the search
267           string doesn’t contain any uppercase letters. By default, the
268           search is case sensitive.
269
270       mailmap (bool)
271           Read canonical name and email addresses for authors and committers
272           from .mailmap. Off by default. See git-shortlog(1).
273
274       wrap-lines (bool)
275           Wrap long lines. By default, lines are not wrapped. Not compatible
276           with line numbers enabled.
277
278       focus-child (bool)
279           Whether to focus the child view when it is opened. When disabled
280           the focus will remain in the parent view, avoiding reloads of the
281           child view when navigating the parent view. True by default.
282
283       send-child-enter (bool)
284           Whether to send "enter" key presses to the child view, even if
285           parent view is active. When disabled the child view has to be
286           explicitly focused to receive the "enter" key presses. In practice
287           only relevant when set focus-child = no. True by default.
288
289       editor-line-number (bool)
290           Whether to pass the selected line number to the editor command. The
291           line number is passed as +<line-number> in front of the file name.
292           Example: vim +10 tig.c
293
294       history-size (int)
295           Size of the persistent ~/.tig_history file when compiled with
296           readline support. Default is 500. Set to 0 to disable.
297
298       mouse (bool)
299           Whether to enable mouse support. Off by default since it makes
300           selecting text from the terminal less intuitive. When enabled hold
301           down Shift (or Option on Mac) to select text. Mouse support
302           requires that ncurses itself support mouse events.
303
304       mouse-scroll (int)
305           Interval to scroll up or down using the mouse. The default is 3
306           lines. Mouse support requires that ncurses itself support mouse
307           events and that you have enabled mouse support in ~/.tigrc with set
308           mouse = true.
309
310       mouse-wheel-cursor (bool)
311           Whether to prefer moving the cursor to scrolling the view when
312           using the mouse wheel. Off by default. Combines well with set
313           mouse-scroll = 1. Mouse support requires that ncurses itself
314           support mouse events and that you have enabled mouse support in
315           ~/.tigrc with set mouse = true.
316
317       pgrp (bool)
318           Make tig process-group leader when starting and clean all processes
319           when exiting. Off by default. Do not enable this option if you are
320           using a Zsh version affected by zsh-workers/43379. Run xclip with
321           setsid to keep clipboard content after exiting tig. If you are
322           using git-credential-cache helper, set option
323           credentialCache.ignoreSIGHUP.
324
325       start-on-head (bool)
326           Start with cursor on HEAD commit.
327
328       refresh-mode (mixed) [manual|auto|after-command|periodic|<bool>]
329           Configures how views are refreshed based on modifications to
330           watched files in the repository. When set to manual, nothing is
331           refreshed automatically. When set to auto, views are refreshed when
332           a modification is detected in another view. When set to
333           after-command only refresh after returning from an external
334           command. When set to periodic, visible views are refreshed
335           periodically using refresh-interval.
336
337       refresh-interval (int)
338           Interval in seconds between view refresh update checks when
339           refresh-mode is set to periodic.
340
341       file-args (args)
342           Command line arguments referring to files. These are filtered using
343           git-rev-parse(1).
344
345       rev-args (args)
346           Command line arguments referring to revisions. These are filtered
347           using git-rev-parse(1).
348
349   View settings
350       The view settings define the order and options for the different
351       columns of a view. Each view setting expects a space-separated list of
352       column specifications. Column specifications starts with the column
353       type, and can optionally be followed by a colon (:) and a list of
354       column options. E.g. the following column specification defines an
355       author column displaying the author email and with a fixed width of 20
356       characters: author:email,width=20.
357
358       The first option value in a column specification is always the display
359       option. When no display value is given, yes is assumed. For display
360       options expecting an enumerated value this will automatically resolve
361       to the default enum value. For example, file-name will automatically
362       have its display setting resolve to auto.
363
364       Specifications can also be given for a single column, for example to
365       override the defaults in the system tigrc file. To override a single
366       column, use the column name as a suffix after the view setting name,
367       e.g. main-view-date will allow to set the date in the main view.
368
369       Examples:
370
371           # Enable both ID and line numbers in the blame view
372           set blame-view = date:default author:full file-name:auto id:yes,color \
373                            line-number:yes,interval=5 text
374
375           # Change grep view to be similar to `git grep` format
376           set grep-view = file-name:yes line-number:yes,interval=1 text
377
378           # Show file sizes as units
379           set tree-view = line-number:no,interval=5 mode author:full \
380                           file-size:units date:default id:no file-name
381
382           # Show line numbers for every 10th line in the pager view
383           set pager-view = line-number:yes,interval=10 text
384
385           # Shorthands to change view settings for a previously defined column
386           set main-view-date = custom
387           set main-view-date-format = "%Y-%m-%d %H:%M"
388           set blame-view-line-number = no
389           # Use Git's default commit order, even when the commit graph is enabled.
390           set commit-order = default
391
392
393       The following list shows which the available view settings and what
394       column types they support:
395
396       blob-view, diff-view, log-view, pager-view, stage-view
397           line-number, text
398
399       blame-view
400           author, date, file-name, id, line-number, text
401
402       grep-view
403           file-name, line-number, text
404
405       main-view, reflog-view
406           author, date, commit-title, id, line-number, ref
407
408       refs-view
409           author, date, commit-title, id, line-number, ref
410
411       stash-view
412           author, date, commit-title, id, line-number
413
414       status-view
415           file-name, line-number, status
416
417       tree-view
418           author, date, id, file-name, file-size, line-number, mode
419
420       Supported column types and their respective column options:
421
422       author
423
424display (mixed) [full|abbreviated|email|email-user|<bool>]: How
425               to display author names. If set to "abbreviated" author
426               initials will be shown.
427
428width (int): Fixed width for the column. When set to a value
429               between 1 and 10, the author name will be abbreviated to the
430               author’s initials. When set to zero, the width is automatically
431               sized to fit the content.
432
433maxwidth (int): Maximum width of the column. Permit
434               automatically sizing content, up to this limit. Can be
435               specified either as the number of columns, e.g.  15, or as a
436               percentage of the view width, e.g.  20%, where the maximum is
437               100%.
438
439       commit-title
440
441graph (mixed) [no|v2|v1]: Whether to show the revision graph in
442               the main view on start-up. "v1" refers to the old graph
443               rendering, which is less accurate but faster and thus
444               recommended in large repositories. See also the line-graphics
445               options.
446
447refs (bool): Whether to show references (branches, tags, and
448               remotes) in the main view. Can be toggled.
449
450overflow (bool or int): Whether to highlight text in commit
451               titles exceeding a given width. When set to a boolean, it
452               enables or disables the highlighting using the default width of
453               50 character. When set to an int, the assigned value is used as
454               the maximum character width.
455
456       date
457
458display (mixed)
459               [relative|relative-compact|custom|default|<bool>]: How to
460               display dates. If set to "relative" or "relative-compact" a
461               relative date will be used, e.g. "2 minutes ago" or "2m". If
462               set to "custom", the strftime(3) string format specified in the
463               "format" option is used.
464
465local (bool): If true, use localtime(3) to convert to local
466               timezone. Note that relative dates always use local offsets.
467
468format (string): format string to pass to strftime(3) when
469               custom display mode has been selected.
470
471width (int): Fixed width for the column. When set to zero, the
472               width is automatically sized to fit the content.
473
474       file-name
475
476display (mixed) [auto|always|<bool>]: When to display file
477               names. If set to "auto" file names are shown only when needed,
478               e.g. when running: tig blame -C <file>.
479
480width (int): Width of the column. When set to zero, the width
481               is automatically sized to fit the content.
482
483maxwidth (int): Maximum width of the column. Permit
484               automatically sizing content, up to this limit. Can be
485               specified either as the number of columns, e.g.  15, or as a
486               percentage of the view width, e.g.  20%, where the maximum is
487               100%.
488
489       file-size
490
491display (mixed) [default|units|<bool>]: How to display file
492               sizes. When set to "units", sizes are shown using binary
493               prefixes, e.g. 12524 bytes is shown as "12.2K".
494
495width (int): Fixed width for the filename column. When set to
496               zero, the width is automatically sized to fit the content.
497
498       id
499
500display (bool): Whether to show commit IDs in the main view.
501
502width (int) : Fixed width for the commit ID column. When unset
503               Tig will use the value of core.abbrev if found. See
504               git-config(1) on how to set core.abbrev. When set to zero the
505               width is automatically sized to fit the content of reflog (e.g.
506               ref/stash@{4}) IDs and otherwise default to 7.
507
508       line-number
509
510display (bool): Whether to show line numbers.
511
512interval (int): Interval between line numbers.
513
514width (int): Fixed width for the column. When set to zero, the
515               width is automatically sized to fit the content.
516
517       mode
518
519display (bool): Whether to show file modes.
520
521width (int): Fixed width for the column. When set to zero, the
522               width is automatically sized to fit the content.
523
524       ref
525
526display (bool): Whether to show the reference name.
527
528width (int): Fixed width for the column. When set to zero, the
529               width is automatically sized to fit the content.
530
531maxwidth (int): Maximum width of the column. Permit
532               automatically sizing content, up to this limit. Can be
533               specified either as the number of columns, e.g.  15, or as a
534               percentage of the view width, e.g.  20%, where the maximum is
535               100%.
536
537       status
538
539display (mixed) [no|short|long|<bool>]: How to display the
540               status label.
541
542       text
543
544commit-title-overflow (bool or int): Whether to highlight
545               commit titles exceeding a given width in the diff view. When
546               set to a boolean, it enables or disables the highlighting using
547               the default width of 50 character. When set to an int, the
548               assigned value is used as the maximum character width.
549
550       All column options can be toggled. For display options, use the option
551       name as the prefix followed by a dash and the column name. E.g. :toggle
552       author-display will toggle the display option in the author column. For
553       all other options use the column name followed by a dash and then the
554       option name as the suffix. E.g. :toggle commit-title-graph will toggle
555       the graph option in the commit-title column. Alternatively, use the
556       option menu to manipulate options.
557

BIND COMMAND

559       Using bind commands, keys can be mapped to an action when pressed in a
560       given key map. The syntax is:
561
562           bind keymap key action
563
564
565       Examples:
566
567           # Add keybinding to quickly jump to the next diff chunk in the stage view
568           bind stage <Enter> :/^@@
569
570           # Disable the default mapping for running git-gc
571           bind generic G none
572
573           # User-defined external command to amend the last commit
574           bind status + !git commit --amend
575
576           # User-defined internal command that reloads ~/.tigrc
577           bind generic S :source ~/.tigrc
578
579           # UTF8-encoded characters can be used as key values.
580           bind generic ø @sh -c "printf '%s' %(commit) | pbcopy"
581
582
583       Or in the Git configuration files:
584
585           [tig "bind"]
586                   # 'unbind' the default quit key binding
587                   main = Q none
588                   # Cherry-pick current commit onto current branch
589                   generic = C !git cherry-pick %(commit)
590
591
592       Keys are mapped by first searching the keybindings for the current
593       view, then the keybindings for the generic keymap, and last the default
594       keybindings. Thus, the view keybindings override the generic
595       keybindings which override the built-in keybindings.
596
597       Keybindings at the line-entry prompt are typically governed by the
598       readline library, and are configured separately in ~/.inputrc. See
599       readline(1). Tig respects but does not require an $if tig section in
600       ~/.inputrc.
601
602       Keymaps
603           Valid keymaps are: main, diff, log, reflog, help, pager, status,
604           stage, tree, blob, blame, refs, stash, grep and generic. Use
605           generic to set key mapping in all keymaps. Use search to define
606           keys for navigating search results during search.
607
608       Key values
609           Key values should never be quoted. Use either an ASCII or
610           UTF8-encoded character or one of the following symbolic key names.
611           Symbolic key names are case insensitive and starts with "<" and
612           ends with ">". Use <Hash> to bind to the # key, since the hash mark
613           is used as a comment character. Use <LessThan> to bind to the <
614           key.
615
616       <Enter>, <Space>, <Backspace>, <Tab>, <Escape> or <Esc>, <Left>,
617       <Right>, <Up>, <Down>, <Insert> or <Ins>, <Delete> or <Del>, <Hash>,
618       <LessThan> or <LT>, <Home>, <End>, <PageUp> or <PgUp>, <PageDown> or
619       <PgDown>, <ScrollBack> or <SBack>, <ScrollFwd> or <SFwd>, <ShiftTab> or
620       <BackTab>, <ShiftLeft>, <ShiftRight>, <ShiftDelete> or <ShiftDel>,
621       <ShiftHome>, <ShiftEnd>, <SingleQuote>, <DoubleQuote>, <F1> ... <F19>
622
623       To define key mappings with the Ctrl key, use <Ctrl-key>. In addition,
624       key combos consisting of an initial Escape key followed by a normal key
625       value can be bound using <Esc>key.
626
627       Examples:
628
629           bind main R             refresh
630           bind main <Down>        next
631           bind main <Ctrl-f>      scroll-page-down
632           bind main <Esc>o        options
633           bind main <ShiftTab>    parent
634
635
636       Notes
637
638       •   Tig reads keystrokes via ncurses and is subject to various
639           limitations. See ncurses(3x) and terminfo(5) (or termcap).
640
641       •   Ctrl-m and Ctrl-i cannot be bound as they conflict with Enter and
642           Tab respectively.
643
644       •   Case differences cannot be distinguished in control sequences such
645           as Ctrl-f and Ctrl-F.
646
647       •   Ctrl-<Space> is typically translated to Ctrl-@, which is available
648           for binding.
649
650       •   Only some subset of special symbolic keys such as <ShiftTab> will
651           be available in any given terminal emulator.
652
653       •   Ctrl-z is automatically used for process control and will suspend
654           Tig and open a subshell (use fg to reenter Tig).
655
656           Actions
657               Actions are either specified as user-defined commands (external
658               or internal) or using action names as described in the
659               following sections.
660
661   External user-defined command
662       These actions start with one or more of the following option flags
663       followed by the command that should be executed.
664
665
666       !   Run the command in the
667           foreground with output
668           shown.
669
670       @   Run the command in the
671           background with no output.
672
673       +   Run the command
674           synchronously, and echo
675           the first line of output
676           to the status bar.
677
678       ?   Prompt the user before
679           executing the command.
680
681       <   Exit Tig after executing
682           the command.
683
684       >   Re-open Tig instantly in
685           the last displayed view
686           after executing the
687           command.
688
689
690       Unless otherwise specified, commands are run in the foreground with
691       their console output shown (as if ! was specified). When multiple
692       command options are specified their behavior are combined, e.g. "?<git
693       commit" will prompt the user whether to execute the command and will
694       exit Tig after completion.
695
696       Note that if you want to use pipes or redirection in your commands then
697       you must run them in a subshell, i.e. embed your commands in sh -c
698       '<commands>'.
699
700       Browsing state variables
701           User-defined commands can optionally refer to Tig’s internal state
702           using the following variable names, which are substituted before
703           commands are run:
704
705
706           %(head)                       The currently viewed head
707                                         ID. Defaults to HEAD
708
709           %(commit)                     The currently selected
710                                         commit ID.
711
712           %(blob)                       The currently selected
713                                         blob ID.
714
715           %(branch)                     The currently selected
716                                         branch name.
717
718           %(remote)                     The currently selected
719                                         remote name. For remote
720                                         branches %(branch) will
721                                         contain the branch name.
722
723           %(tag)                        The currently selected tag
724                                         name.
725
726
727
728           %(refname)                    The currently selected
729                                         reference name including
730                                         the remote name for remote
731                                         branches.
732
733           %(stash)                      The currently selected
734                                         stash name.
735
736           %(directory)                  The current directory path
737                                         in the tree view or "." if
738                                         undefined.
739
740           %(file)                       The currently selected
741                                         file.
742
743           %(lineno)                     The currently selected
744                                         line number. Defaults to
745                                         0.
746
747           %(lineno_old)                 The currently selected
748                                         line number, before the
749                                         diff was applied. Defaults
750                                         to 0.
751
752           %(ref)                        The reference given to
753                                         blame or HEAD if
754                                         undefined.
755
756           %(revargs)                    The revision arguments
757                                         passed on the command
758                                         line.
759
760           %(fileargs)                   The file arguments passed
761                                         on the command line.
762
763           %(cmdlineargs)                All other options passed
764                                         on the command line.
765
766           %(diffargs)                   Options from diff-options
767                                         or TIG_DIFF_OPTS used by
768                                         the diff and stage view.
769
770           %(blameargs)                  Options from blame-options
771                                         used by the blame view.
772
773           %(logargs)                    Options from log-options
774                                         used by the log view.
775
776           %(mainargs)                   Options from main-options
777                                         used by the main view.
778
779           %(prompt)                     Prompt for the argument
780                                         value. Optionally specify
781                                         a custom prompt using
782                                         "%(prompt Enter branch
783                                         name: )"
784
785           %(text)                       The text of the currently
786                                         selected line.
787
788           %(repo:head)                  The name of the checked
789                                         out branch, e.g. master
790
791
792
793
794           %(repo:head-id)               The commit ID of the
795                                         checked out branch.
796
797           %(repo:remote)                The remote associated with
798                                         the checked out branch,
799                                         e.g. origin/master.
800
801           %(repo:cdup)                  The path to change
802                                         directory to the
803                                         repository root, e.g. ../
804
805           %(repo:prefix)                The path prefix of the
806                                         current work directory,
807                                         e.g subdir/.
808
809           %(repo:git-dir)               The path to the Git
810                                         directory, e.g.
811                                         /src/repo/.git.
812
813           %(repo:worktree)              The worktree path, if
814                                         defined.
815
816           %(repo:is-inside-work-tree)   Whether Tig is running
817                                         inside a work tree, either
818                                         true or false.
819
820
821           Examples:
822
823               # Save the current commit as a patch file when the user selects a commit
824               # in the main view and presses 'S'.
825               bind main S !git format-patch -1 %(commit)
826
827               # Create and checkout a new branch; specify custom prompt
828               bind main B ?git checkout -b "%(prompt Enter new branch name: )"
829
830               # Show commit statistics for the author under the cursor
831               bind main U +sh -c 'git --no-pager shortlog -s --author="$(git show -s --format=%aE %(commit))" </dev/tty'
832
833
834       Advanced shell-like commands
835           If your command requires use of dynamic features, such as
836           subshells, expansion of environment variables and process control,
837           this can be achieved by using a shell command:
838
839           Example 1. Configure a binding to copy the current commit ID to the
840           clipboard.
841
842               bind generic I @sh -c "echo -n %(commit) | xclip -selection c"
843
844
845
846           Or by using a combination of Git aliases and Tig external commands.
847           The following example entries can be put in either the .gitconfig
848           or .git/config file:
849
850           Example 2. Git configuration which binds Tig keys to Git command
851           aliases.
852
853               [alias]
854                       gitk-bg = !"gitk HEAD --not $(git rev-parse --remotes) &"
855                       publish = !"for i in origin public; do git push $i; done"
856               [tig "bind"]
857                       generic = V @git gitk-bg
858                       generic = > !git publish
859
860
861
862   Internal user-defined commands
863       Actions beginning with a : will be run and interpreted as internal
864       commands and act similar to commands run via Tig’s prompt. Valid
865       internal commands are configuration file options (as described in this
866       document) and pager view commands. Examples:
867
868           # Reload ~/.tigrc when 'S' is pressed
869           bind generic S :source .tigrc
870
871           # Change diff view to show all commit changes regardless of file limitations
872           bind diff F :set diff-options = --full-diff
873
874           # Show the output of git-reflog(1) in the pager view
875           bind generic W :!git reflog
876
877           # Search for previous diff (c)hunk and next diff header
878           bind stage 2 :?^@@
879           bind stage D :/^diff --(git|cc)
880
881           bind main I :toggle id                          # Show/hide the ID column
882           bind diff D :toggle diff-options --minimal      # Use minimal diff algorithm
883           bind diff [ :toggle diff-context -3             # Decrease context (-U arg)
884           bind diff ] :toggle diff-context +3             # Increase context
885           bind generic V :toggle split-view-height -10%   # Decrease split height
886
887
888       Similar to external commands, pager view commands can contain variable
889       names that will be substituted before the command is run.
890
891   Action names
892       Valid action names are described below. Note, all action names are
893       case-insensitive, and you may use -, _, and . interchangeably, e.g.
894       "view-main", "View.Main", and "VIEW_MAIN" are the same.
895
896       View switching
897           view-main     Show main view
898
899           view-diff     Show diff view
900
901           view-log      Show log view
902
903           view-reflog   Show reflog view
904
905           view-tree     Show tree view
906
907           view-blob     Show blob view
908
909           view-blame    Show blame view
910
911           view-refs     Show refs view
912
913           view-status   Show status view
914
915           view-stage    Show stage view
916
917           view-stash    Show stash view
918
919           view-grep     Show grep view
920
921           view-pager    Show pager view
922
923           view-help     Show help view
924
925
926       View manipulation
927           enter                Enter and open selected
928                                line
929
930           back                 Go back to the previous
931                                view state
932
933           next                 Move to next
934
935           previous             Move to previous
936
937           parent               Move to parent
938
939           view-next            Move focus to the next
940                                view
941
942           refresh              Reload and refresh view
943
944           maximize             Maximize the current view
945
946           view-close           Close the current view
947
948           view-close-no-quit   Close the current view
949                                without quitting
950
951           quit                 Close all views and quit
952
953
954       View-specific actions
955           status-update       Stage/unstage chunk or
956                               file changes
957
958           status-revert       Revert chunk or file
959                               changes
960
961           status-merge        Merge file using external
962                               tool
963
964           stage-update-line   Stage/unstage single line
965
966           stage-update-part   Stage/unstage part of a
967                               chunk
968
969           stage-split-chunk   Split current diff chunk
970
971
972       Cursor navigation
973           move-up               Move cursor one line up
974
975           move-down             Move cursor one line down
976
977           move-page-up          Move cursor one page up
978
979           move-page-down        Move cursor one page down
980
981           move-half-page-up     Move cursor half a page up
982
983           move-half-page-down   Move cursor half a page
984                                 down
985
986           move-first-line       Move cursor to first line
987
988           move-last-line        Move cursor to last line
989
990
991
992           move-next-merge       Move cursor to next merge
993                                 commit
994
995           move-prev-merge       Move cursor to previous
996                                 merge commit
997
998
999       Scrolling
1000           scroll-line-up          Scroll one line up
1001
1002           scroll-line-down        Scroll one line down
1003
1004           scroll-page-up          Scroll one page up
1005
1006           scroll-page-down        Scroll one page down
1007
1008           scroll-half-page-up     Scroll half a page up
1009
1010           scroll-half-page-down   Scroll half a page down
1011
1012           scroll-first-col        Scroll to the first line
1013                                   columns
1014
1015           scroll-left             Scroll two columns left
1016
1017           scroll-right            Scroll two columns right
1018
1019
1020       Searching
1021           search        Search the view
1022
1023           search-back   Search backwards in the
1024                         view
1025
1026           find-next     Find next search match
1027
1028           find-prev     Find previous search match
1029
1030
1031       Misc
1032           edit            Open in editor
1033
1034           prompt          Open the prompt
1035
1036           options         Open the options menu
1037
1038           screen-redraw   Redraw the screen
1039
1040           stop-loading    Stop all loading views
1041
1042           show-version    Show version information
1043
1044           none            Do nothing
1045
1046

COLOR COMMAND

1048       Color commands control highlighting and the user interface styles. If
1049       your terminal supports color, these commands can be used to assign
1050       foreground and background combinations to certain areas. Optionally, an
1051       attribute can be given as the last parameter. The syntax is:
1052
1053           color area fgcolor bgcolor [attributes]
1054
1055
1056       Examples:
1057
1058           # Override the default terminal colors to white on black.
1059           color default           white   black
1060           # Diff colors
1061           color diff-header       yellow  default
1062           color diff-index        blue    default
1063           color diff-chunk        magenta default
1064           color "Reported-by:"    green   default
1065           # View-specific color
1066           color tree.date         black   cyan    bold
1067
1068
1069       Or in the Git configuration files:
1070
1071           [tig "color"]
1072                   # A strange looking cursor line
1073                   cursor          = red   default underline
1074                   # UI colors
1075                   title-blur      = white blue
1076                   title-focus     = white blue    bold
1077           # View-specific color
1078           [tig "color.tree"]
1079                   date            = cyan  default bold
1080
1081
1082
1083       Area names
1084           Can be either a built-in area name or a custom quoted string. The
1085           latter allows custom color rules to be added for lines matching a
1086           quoted string. Valid built-in area names are described below. Note,
1087           all names are case-insensitive, and you may use -, and _
1088           interchangeably, e.g. "Diff-Header" and "DIFF_HEADER" are the same.
1089           View-specific colors can be defined by prefixing the view name to
1090           the area name, e.g. "stage.diff-chunk" and "diff.diff-chunk".
1091
1092       Color names
1093           Valid colors include: white, black, green, magenta, blue, cyan,
1094           yellow, red, default. Use default to refer to the default terminal
1095           colors, for example, to keep the background transparent when you
1096           are using a terminal with a transparent background.
1097
1098           Colors can also be specified using the keywords color0, color1,
1099           ..., colorN-1 (where N is the number of colors supported by your
1100           terminal). This is useful when you remap the colors for your
1101           display or want to enable colors supported by 88-color and
1102           256-color terminals. Note that the color prefix is optional. If you
1103           prefer, you can specify colors directly by their numbers 0, 1, ...,
1104           N-1 instead, just like in the configuration file of Git.
1105
1106       Attribute names
1107           Valid attributes include: normal, blink, bold, dim, reverse,
1108           standout, and underline. Note, not all attributes may be supported
1109           by the terminal.
1110
1111   UI colors
1112       The colors and attributes to be used for the text that is not
1113       highlighted or that specify the use of the default terminal colors can
1114       be controlled by setting the default color option.
1115
1116       Table 1. General
1117       default         Override default terminal
1118                       colors (see above).
1119
1120       cursor          The cursor line.
1121
1122
1123
1124       status          The status window showing
1125                       info messages.
1126
1127       title-focus     The title window for the
1128                       current view.
1129
1130       title-blur      The title window of any
1131                       backgrounded view.
1132
1133       search-result   Highlighted search result.
1134
1135       delimiter       Delimiter shown for
1136                       truncated lines.
1137
1138       header          The view header lines. Use
1139                       status.header to color the
1140                       staged, unstaged, and
1141                       untracked sections in the
1142                       status view. Use
1143                       help.header to color the
1144                       keymap sections in the
1145                       help view.
1146
1147       line-number     Line numbers.
1148
1149       id              The commit ID.
1150
1151       date            The author date.
1152
1153       author          The commit author.
1154
1155       mode            The file mode holding the
1156                       permissions and type.
1157
1158       overflow        Title text overflow.
1159
1160       directory       The directory name.
1161
1162       file            The file name.
1163
1164       file-size       File size.
1165
1166
1167       Table 2. Main view colors
1168       graph-commit     The commit dot in the
1169                        revision graph.
1170
1171       palette-[0-13]   14 different colors, used
1172                        for distinguishing
1173                        branches or commits. By
1174                        default, the palette uses
1175                        the ASCII colors, where
1176                        the second half of them
1177                        have the bold attribute
1178                        enabled to give a brighter
1179                        color. Example: palette-0
1180                        = red
1181
1182       main-commit      The commit comment.
1183
1184       main-annotated   The commit comment of an
1185                        annotated commit.
1186
1187
1188
1189
1190       main-head        Label of the current
1191                        branch.
1192
1193       main-remote      Label of a remote.
1194
1195       main-tracked     Label of the remote
1196                        tracked by the current
1197                        branch.
1198
1199       main-tag         Label of a signed tag.
1200
1201       main-local-tag   Label of a local tag.
1202
1203       main-ref         Label of any other
1204                        reference.
1205
1206       main-replace     Label of replaced
1207                        reference.
1208
1209
1210       Table 3. Status view
1211       stat-none        Empty status label.
1212
1213       stat-staged      Status flag of staged
1214                        files.
1215
1216       stat-unstaged    Status flag of unstaged
1217                        files.
1218
1219       stat-untracked   Status flag of untracked
1220                        files.
1221
1222
1223       Table 4. Help view
1224       help-group    Help group name.
1225
1226       help-action   Help action name.
1227
1228
1229   Highlighting
1230       Diff markup
1231           Options concerning diff start, chunks and lines added and deleted.
1232
1233       diff-header, diff-chunk, diff-stat, diff-add, diff-add2, diff-del,
1234       diff-del2, diff-add-highlight, diff-del-highlight
1235
1236       Enhanced Git diff markup
1237           Extra diff information emitted by the Git diff machinery, such as
1238           mode changes, rename detection, and similarity.
1239
1240       diff-oldmode, diff-newmode, diff-copy-from, diff-copy-to,
1241       diff-similarity, diff-index
1242
1243       Pretty print commit headers
1244           Commit diffs and the revision logs are usually formatted using
1245           pretty printed headers , unless --pretty=raw was given. This
1246           includes lines, such as merge info, commit ID, and author and
1247           committer date.
1248
1249       pp-refs, pp-reflog, pp-reflogmsg, pp-merge
1250
1251       Raw commit header
1252           Usually shown when --pretty=raw is given, however commit is pretty
1253           much omnipresent.
1254
1255       commit, parent, tree, author, committer
1256
1257       Commit message
1258           Signed-off-by, Acked-by, Reviewed-by and Tested-by lines are
1259           colorized. Characters in the commit title exceeding a predefined
1260           width can be highlighted.
1261
1262       Tree markup
1263           Colors for information of the tree view.
1264
1265       tree-dir, tree-file
1266

SOURCE COMMAND

1268       Source commands make it possible to read additional configuration
1269       files. Sourced files are included in-place, meaning when a source
1270       command is encountered the file will be immediately read. Any commands
1271       later in the current configuration file will take precedence.
1272
1273       If the given path does not exist, tig will proceed with a warning. Give
1274       the -q parameter to suppress the warning.
1275
1276       The syntax is:
1277
1278           source [-q] path
1279
1280
1281       Examples:
1282
1283           source ~/.tig/colorscheme.tigrc
1284           source ~/.tig/keybindings.tigrc
1285
1286
1288       Copyright (c) 2006-2014 Jonas Fonseca <jonas.fonseca@gmail.com[1]>
1289
1290       This program is free software; you can redistribute it and/or modify it
1291       under the terms of the GNU General Public License as published by the
1292       Free Software Foundation; either version 2 of the License, or (at your
1293       option) any later version.
1294

SEE ALSO

1296       tig(1), tigmanual(7), git(7), git-config(1)
1297

NOTES

1299        1. jonas.fonseca@gmail.com
1300           mailto:jonas.fonseca@gmail.com
1301
1302
1303
1304Tig 2.5.4                         06/05/2021                          TIGRC(5)
Impressum