Skip to content

Commit 5a4f894

Browse files
committed
Add troubleshooting information
1 parent d109613 commit 5a4f894

File tree

5 files changed

+107
-3
lines changed

5 files changed

+107
-3
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ RPM_RELEASE = $(word 2,$(RPM_VERLIST))$(if $(WTDIRTY),.dirty)
4848
DFLAGS = -g -DDEBUG -Werror -O0
4949
EXE = src/tig
5050
TOOLS = test/tools/test-graph tools/doc-gen
51-
TXTDOC = doc/tig.1.adoc doc/tigrc.5.adoc doc/manual.adoc NEWS.adoc README.adoc INSTALL.adoc test/API.adoc
51+
TXTDOC = doc/tig.1.adoc doc/tigrc.5.adoc doc/manual.adoc NEWS.adoc README.adoc TROUBLESHOOTING.adoc INSTALL.adoc test/API.adoc
5252
MANDOC = doc/tig.1 doc/tigrc.5 doc/tigmanual.7
53-
HTMLDOC = doc/tig.1.html doc/tigrc.5.html doc/manual.html README.html INSTALL.html NEWS.html
53+
HTMLDOC = doc/tig.1.html doc/tigrc.5.html doc/manual.html README.html TROUBLESHOOTING.html INSTALL.html NEWS.html
5454
ALLDOC = $(MANDOC) $(HTMLDOC) doc/manual.html-chunked doc/manual.pdf
5555

5656
# Never include the release number in the tarname for tagged
@@ -403,6 +403,9 @@ doc/manual.html: ASCIIDOC_FLAGS += -ainclude-manual-toc
403403
README.html: README.adoc doc/asciidoc.conf
404404
$(QUIET_ASCIIDOC)$(ASCIIDOC) $(ASCIIDOC_FLAGS) -b xhtml11 -d article -a readme $<
405405

406+
TROUBLESHOOTING.html: TROUBLESHOOTING.adoc doc/asciidoc.conf
407+
$(QUIET_ASCIIDOC)$(ASCIIDOC) $(ASCIIDOC_FLAGS) -b xhtml11 -d article $<
408+
406409
INSTALL.html: INSTALL.adoc doc/asciidoc.conf
407410
$(QUIET_ASCIIDOC)$(ASCIIDOC) $(ASCIIDOC_FLAGS) -b xhtml11 -d article $<
408411

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+
```

book.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
- [Installation](INSTALL.adoc)
44
- [Release notes](NEWS.adoc)
5+
- [Troubleshooting](TROUBLESHOOTING.adoc)
56
- [tig(1)](doc/tig.1.adoc)
67
- [tigrc(5)](doc/tigrc.5.adoc)
78
- [Manual](doc/manual.adoc)

contrib/tig.spec.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ CFLAGS="$RPM_OPT_FLAGS -DVERSION=tig-%{version}-%{release}"
4848
%defattr(-,root,root)
4949
%{_bindir}/*
5050
%{_sysconfdir}/*
51-
%doc README.adoc COPYING INSTALL.adoc NEWS.adoc contrib/tig-completion.bash contrib/tig-completion.zsh
51+
%doc README.adoc COPYING TROUBLESHOOTING.adoc INSTALL.adoc NEWS.adoc contrib/tig-completion.bash contrib/tig-completion.zsh
5252
%{!?_without_docs: %{_mandir}/man1/*.1*}
5353
%{!?_without_docs: %{_mandir}/man5/*.5*}
5454
%{!?_without_docs: %{_mandir}/man7/*.7*}

0 commit comments

Comments
 (0)