Skip to content

Commit e323d59

Browse files
committed
Add troubleshooting information
1 parent 9a3b2b8 commit e323d59

File tree

2 files changed

+100
-0
lines changed

2 files changed

+100
-0
lines changed

README.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ Resources
2626

2727
Bugs and Feature Requests
2828
-------------------------
29+
Please check out link:TROUBLESHOOTING.{docext}[the troubleshooting guide]
30+
if you are experiencing issues with Tig.
31+
2932
Bugs and feature requests can be reported using the
3033
https://github.com/jonas/tig/issues[issue tracker] or by mail to either
3134
the Git mailing list or directly to the maintainer. Ensure that the word

TROUBLESHOOTING.adoc

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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 the diff-highlight
44+
option not working when running Tig inside screen/tmux. It can be
45+
fixed 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. Check out
58+
https://invisible-island.net/xterm/xterm.faq.html#known_bugs[XTerm FAQ]
59+
for more details and information on other terminal emulators.
60+
61+
LANG
62+
~~~~
63+
64+
The `LANG` variable must be set in accordance with your terminal
65+
encoding settings. If the `LANG` variable is not properly set,
66+
accented characters will be distorted.
67+
68+
Use `locale -a` to check if your `LANG` variable is present in the
69+
list of available locales (on Linux, you may find that `UTF-8` has
70+
been substituted for `utf8` but they are equivalent).
71+
72+
Note that the ability to set the `LANG` variable to values such as
73+
`en_DE` with KDE does not imply their validity.
74+
75+
Also check the `LC_ALL` variable as it has precedence over `LANG`.
76+
77+
ESCDELAY
78+
~~~~~~~~
79+
80+
See ESCDELAY environment variable in ncurses(3x) to reduce the one
81+
second delay after pressing the escape key. Nowadays,
82+
`export ESCDELAY=100` should be more than enough.
83+
84+
Git
85+
---
86+
87+
Tig relies entirely on Git to access your repository data. If Tig fails
88+
to show any commit, first check the corresponding `git log` command. To
89+
find out which options Tig is using, try `TIG_TRACE=/tmp/tig.log tig`.
90+
91+
Note that Tig's command line parser is not as permissive as that of Git.
92+
For example, arguments such as -S/-G or --grep must be passed without
93+
space:
94+
```
95+
tig -G"<string>"
96+
tig --grep="<string>"
97+
```

0 commit comments

Comments
 (0)