Skip to content

Commit 65552bd

Browse files
committed
Fix terminal color support: default TERM=xterm-256color and COLORTERM=truecolor
1 parent 14a302e commit 65552bd

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

.devcontainer/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
#### ChromaTerm
1111
- **Regex lookbehinds** — replaced alternation inside lookbehinds (`(?<=[\s(]|^)` and `(?<=commit |merge |...)`) with non-capturing groups containing individual lookbehinds (`(?:(?<=[\s(])|^)` and `(?:(?<=commit )|(?<=merge )|...)`) for PCRE2 compatibility
1212

13+
#### Terminal Color Support
14+
- **devcontainer.json** — added `TERM=xterm-256color` and `COLORTERM=truecolor` to `remoteEnv`; Docker defaults to `TERM=xterm` (8 colors) which caused Claude Code and other CLI tools to downgrade rendering
15+
- **setup-aliases.sh** — added terminal color defaults to managed shell block so tmux panes, `docker exec`, and SSH sessions also get 256-color and truecolor support
16+
- **kitty-terminfo/README.md** — updated documentation to reflect container terminal color defaults
17+
1318
### Removed
1419

1520
#### VS Code Extensions

.devcontainer/devcontainer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"CLAUDE_CONFIG_DIR": "/workspaces/.claude",
1111
"GH_CONFIG_DIR": "/workspaces/.gh",
1212
"TMPDIR": "/workspaces/.tmp",
13+
"TERM": "xterm-256color",
14+
"COLORTERM": "truecolor",
1315
"CLAUDECODE": null
1416
},
1517

.devcontainer/features/kitty-terminfo/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ Downloads and compiles the official kitty terminfo entry from the [Kitty termina
1414

1515
## Usage
1616

17-
No configuration needed. Once installed, containers automatically recognize `TERM=xterm-kitty` and provide full capability support.
17+
The container defaults to `TERM=xterm-256color` with `COLORTERM=truecolor`, which provides full 256-color and 24-bit truecolor support for all terminals.
18+
19+
For Kitty users: if your host terminal forwards `TERM=xterm-kitty` into the container, the installed terminfo ensures full Kitty-specific capability support (correct `bce` behavior, status line, etc.). If not forwarded, `xterm-256color` provides equivalent color rendering.
1820

1921
```bash
2022
# Verify installation

.devcontainer/scripts/setup-aliases.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ export GH_CONFIG_DIR="${GH_CONFIG_DIR:-/workspaces/.gh}"
7474
export LANG=en_US.UTF-8
7575
export LC_ALL=en_US.UTF-8
7676
77+
# Terminal color defaults — Docker sets TERM=xterm (8 colors); upgrade to 256-color
78+
if [ "\$TERM" = "xterm" ] || [ -z "\$TERM" ]; then
79+
export TERM=xterm-256color
80+
fi
81+
export COLORTERM="\${COLORTERM:-truecolor}"
82+
7783
# Prefer native binary over npm-installed version
7884
if [ -x "\$HOME/.local/bin/claude" ]; then
7985
_CLAUDE_BIN="\$HOME/.local/bin/claude"

0 commit comments

Comments
 (0)