mirror of
https://github.com/tmate-io/tmate.git
synced 2025-02-17 10:50:51 +01:00
Correct usage of termcap.
This commit is contained in:
parent
e3e0d70c0e
commit
b2606c0421
32
FAQ
32
FAQ
@ -42,16 +42,17 @@ include as much of the following information as possible:
|
|||||||
|
|
||||||
Please send feature requests by email to nicm@users.sourceforge.net.
|
Please send feature requests by email to nicm@users.sourceforge.net.
|
||||||
|
|
||||||
* Why do you use the screen termcap inside tmux? It sucks.
|
* Why do you use the screen terminal description inside tmux? It sucks.
|
||||||
|
|
||||||
It is already widely available. It is planned to change to something else
|
It is already widely available. It is planned to change to something else such
|
||||||
such as xterm-color at some point, if possible.
|
as xterm-xfree86 at some point, if possible.
|
||||||
|
|
||||||
* I don't see any colour in my terminal! Help!
|
* I don't see any colour in my terminal! Help!
|
||||||
|
|
||||||
On some platforms, common termcaps such as xterm do not include colour. screen
|
On some platforms, common terminal descriptions such as xterm do not include
|
||||||
ignores this, tmux does not. If the terminal emulator in use supports colour,
|
colour. screen ignores this, tmux does not. If the terminal emulator in use
|
||||||
use a termcap which correctly lists this, such as xterm-color.
|
supports colour, use a value for TERM which correctly lists this, such as
|
||||||
|
xterm-color.
|
||||||
|
|
||||||
* tmux freezes my terminal when I attach to a session. I even have to kill -9
|
* tmux freezes my terminal when I attach to a session. I even have to kill -9
|
||||||
the shell it was started from to recover!
|
the shell it was started from to recover!
|
||||||
@ -96,9 +97,9 @@ flag may be specified when creating or attaching a client to a tmux session:
|
|||||||
|
|
||||||
* How do I use a 256 colour terminal?
|
* How do I use a 256 colour terminal?
|
||||||
|
|
||||||
tmux will attempt to detect a 256 colour terminal both by looking at the Co
|
tmux will attempt to detect a 256 colour terminal both by looking at the colors
|
||||||
termcap entry and, as this is broken for some terminals such as xterm-256color,
|
terminfo entry and by looking for the string "256col" in the TERM environment
|
||||||
by looking for the string "256col" in the termcap name.
|
variable.
|
||||||
|
|
||||||
If both these methods fail, the -2 flag may be passed to tmux when attaching
|
If both these methods fail, the -2 flag may be passed to tmux when attaching
|
||||||
to a session to indicate the terminal supports 256 colours.
|
to a session to indicate the terminal supports 256 colours.
|
||||||
@ -106,8 +107,9 @@ to a session to indicate the terminal supports 256 colours.
|
|||||||
* vim or $otherprogram doesn't display 256 colours. What's up?
|
* vim or $otherprogram doesn't display 256 colours. What's up?
|
||||||
|
|
||||||
Some programs attempt to detect the number of colours a terminal is capable of
|
Some programs attempt to detect the number of colours a terminal is capable of
|
||||||
by checking the Co termcap entry. However, this is not reliable, and in any
|
by checking the colors terminfo or Co termcap entry. However, this is not
|
||||||
case is missing from the "screen" termcap used inside tmux.
|
reliable, and in any case is missing from the "screen" terminal description
|
||||||
|
used inside tmux.
|
||||||
|
|
||||||
There are three options to allow programs to recognise they are running on
|
There are three options to allow programs to recognise they are running on
|
||||||
a 256-colour terminal inside tmux:
|
a 256-colour terminal inside tmux:
|
||||||
@ -115,9 +117,9 @@ a 256-colour terminal inside tmux:
|
|||||||
- Manually force the application to use 256 colours always or if TERM is set to
|
- Manually force the application to use 256 colours always or if TERM is set to
|
||||||
screen. For vim, you can do this by overriding the t_Co option, see
|
screen. For vim, you can do this by overriding the t_Co option, see
|
||||||
http://vim.wikia.com/wiki/256_colors_in_vim.
|
http://vim.wikia.com/wiki/256_colors_in_vim.
|
||||||
- If the platform includes it, using the "screen-256color" termcap (set
|
- If the platform includes it, using the "screen-256color" terminal description
|
||||||
TERM=screen-256color). "infocmp screen-256color" can be used to check if this
|
(set TERM=screen-256color). "infocmp screen-256color" can be used to check if
|
||||||
is supported. It is possible to set this globally inside tmux using the
|
this is supported. It is possible to set this globally inside tmux using the
|
||||||
default-terminal session option, or it may be done in a shell startup script
|
default-terminal session option, or it may be done in a shell startup script
|
||||||
by checking if TERM is screen and exporting TERM=screen-256color instead.
|
by checking if TERM is screen and exporting TERM=screen-256color instead.
|
||||||
- Creating a custom terminfo file that includes colors#256 in ~/.terminfo and using
|
- Creating a custom terminfo file that includes colors#256 in ~/.terminfo and using
|
||||||
@ -202,4 +204,4 @@ on the Window -> Translation configuration page. For example, change UTF-8 to
|
|||||||
ISO-8859-1 or CP437. It may also be necessary to adjust the way PuTTY treats
|
ISO-8859-1 or CP437. It may also be necessary to adjust the way PuTTY treats
|
||||||
line drawing characters in the lower part of the same configuration page.
|
line drawing characters in the lower part of the same configuration page.
|
||||||
|
|
||||||
$Id: FAQ,v 1.25 2009-08-05 14:56:58 nicm Exp $
|
$Id: FAQ,v 1.26 2009-08-05 16:29:50 nicm Exp $
|
||||||
|
Loading…
Reference in New Issue
Block a user