mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Hyperlink detection recognised Alacritty only through `TERM_PROGRAM=alacritty`, and Alacritty never sets `TERM_PROGRAM`. So in a default Alacritty setup, pi fell back to `hyperlinks: false` and rendered Markdown links as `label (url)` instead of clickable OSC 8 links. Alacritty does set two other variables, which this change now checks: - `TERM=alacritty` when its terminfo entry is installed (otherwise `TERM=xterm-256color`); - `ALACRITTY_WINDOW_ID` for the shell on Unix and macOS. This covers the common macOS case where the terminfo entry is missing. The tmux and screen checks still run first, so behaviour inside multiplexers is unchanged. **Testing** - Added a `detectCapabilities` test covering `TERM=alacritty` and `TERM=xterm-256color` with `ALACRITTY_WINDOW_ID`. It fails without the change and passes with it. - `node --test test/*.test.ts` in `packages/tui`: 1121 passing tests. - `npm run check` passes. - Checked `detectCapabilities()` with clean environments: - Before: `TERM=alacritty` and `ALACRITTY_WINDOW_ID=123` both gave `hyperlinks: false`. - After: both give `hyperlinks: true`. - Plain `xterm-256color` and tmux with `ALACRITTY_WINDOW_ID` still give `false`. Fixes #11767 Requested by @badlogic Co-authored-by: triagent <triagent@localhost> |
||
|---|---|---|
| .. | ||
| components | ||
| alt-screen-search.ts | ||
| autocomplete.ts | ||
| colors.ts | ||
| editor-component.ts | ||
| fuzzy.ts | ||
| index.ts | ||
| keybindings.ts | ||
| keys.ts | ||
| kill-ring.ts | ||
| latex.ts | ||
| layout-node.ts | ||
| layout.ts | ||
| native-modifiers.ts | ||
| native-module-path.ts | ||
| native-platform.ts | ||
| oklab.ts | ||
| program-status.ts | ||
| stdin-buffer.ts | ||
| terminal-colors.ts | ||
| terminal-image.ts | ||
| terminal.ts | ||
| tui-alt-screen.ts | ||
| tui-main-screen.ts | ||
| tui.ts | ||
| undo-stack.ts | ||
| utils.ts | ||
| wheel-scroll.ts | ||
| word-navigation.ts | ||