Skip to content

Commit 9be7239

Browse files
committed
Add troubleshooting information
1 parent 683b0cf commit 9be7239

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

TROUBLESHOOTING.adoc

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
Troubleshooting
2+
===============
3+
:docext: adoc
4+
5+
Display
6+
-------
7+
8+
Tig is based on ncurses and relies on the terminal characteristics
9+
stored in the terminfo database. If you are lying about the capabilities
10+
of your terminal, you cannot expect Tig to work properly.
11+
12+
ncursesw
13+
~~~~~~~~
14+
15+
If you did not compile Tig with `ncursesw` (or default `ncurses` on
16+
macOS) then Unicode characters cannot be displayed.
17+
18+
To make sure which ncurses version you are using, first confirm
19+
which `tig` executable you are running and then use `ldd -r` (Linux) or
20+
`otool -L` (macOS).
21+
22+
If mouse scroll down does not work, check that ncurses was compiled
23+
with `--enable-ext-mouse`. See https://bugs.debian.org/838376 for
24+
more details.
25+
26+
TERM
27+
~~~~
28+
29+
The `TERM` variable must be set in accordance with your terminal type.
30+
31+
If you are using a terminal multiplexer like GNU screen or tmux (but not
32+
dtach), then the `TERM` variable *before* starting the terminal multiplexer
33+
must be set in accordance with your terminal type and the `TERM` variable
34+
*inside* the terminal multiplexer must be set to `screen` or any
35+
compatible variant.
36+
37+
You can check with `infocmp` that you have the proper entry for your
38+
terminal type in your terminfo database.
39+
If you want to use an alternate terminfo database, you can use
40+
`export TERMINFO=/path/to/terminfo`.
41+
42+
Some OS (e.g. OS X 10.11) are shipping with an incomplete terminfo
43+
description for screen resulting, for example, in diff-highlight option
44+
not working when running Tig inside screen/tmux. It can be fixed
45+
locally (for the current user) with:
46+
```
47+
curl -O https://invisible-island.net/datafiles/current/terminfo.src.gz
48+
gunzip terminfo.src
49+
tic -x -o "$HOME/.terminfo" -e screen terminfo.src
50+
```
51+
52+
Note that macOS still comes with and old version of ncurses (5.7) which
53+
may not work well with newer 256-color terminfo entries.
54+
55+
Note that while Putty identifies itself by default as `xterm`, it is
56+
not fully compatible with it. If you have problems with the keyboard
57+
mapping (e.g. Home/End), try to use `putty` instead.
58+
59+
LANG
60+
~~~~
61+
62+
The `LANG` variable must be set in accordance with your terminal
63+
encoding settings. If the `LANG` variable is not properly set,
64+
accented characters will be distorted.
65+
66+
To check that your locale is present in the list of available locales,
67+
use `locale -a | grep "$LANG"`.
68+
69+
Note that the ability to set the `LANG` variable to values such as
70+
`en_DE` with KDE does not infer their validity.
71+
72+
ESCDELAY
73+
~~~~~~~~
74+
75+
See ESCDELAY environment variable in ncurses(3x) to reduce the one
76+
second delay after pressing the escape key. Nowadays,
77+
`export ESCDELAY=100` should be more than enough.
78+
79+
Git
80+
---
81+
82+
Tig relies entirely on Git to access your repository data. If Tig fails
83+
to show any commit, first check the corresponding `git log` command. To
84+
find out which options Tig is using, try `TIG_TRACE=/tmp/tig.log tig`.
85+
86+
Note that Tig's command line parser is not as permissive as that of Git.
87+
For example, arguments such as -S/-G or --grep must be passed without
88+
space:
89+
```
90+
tig -G"<string>"
91+
tig --grep="<string>"
92+
```

0 commit comments

Comments
 (0)