Skip to content

fix: start on a terminal that reports 0x0, and give the macOS JSONL history path - #8

Merged
trancong12102 merged 1 commit into
masterfrom
fix/zero-size-terminal
Nov 23, 2026
Merged

trancong12102 merged 1 commit into
masterfrom
fix/zero-size-terminal

Conversation

@trancong12102

Copy link
Copy Markdown
Contributor

Zero-size terminal

A pty whose size was never set reports 0 rows and 0 columns, and has no LINES or COLUMNS either. termina's get_dimensions returned an error, so Terminal::with_options(...).expect(...) panicked. The panic recovery then returned EOF, which logs the shell out. termina now falls back to 80x24, which covers every size call: startup, the resize loop and rendering. The change is listed with the other termina patches in vendor/README.md.

To reproduce: run pty.fork() with HISTFILE=/dev/null, unset LINES COLUMNS and stty size, which prints 0 0, then enable -f libflyline flyline and type a command.

  • master: bash exits, and the next write gets EIO.
  • This branch: the prompt appears and the command runs.

JSONL history path

default_jsonl_path() uses dirs::data_local_dir(), which is ~/Library/Application Support on macOS. The --jsonl-path help, the HistoryBackend::Flyline doc and the guide said ~/.local/share everywhere. They now name both paths.

Checks

  • cargo fmt -- --check passes.
  • cargo clippy --workspace --all-features -- -D warnings passes.
  • RUSTDOCFLAGS="-D warnings" cargo doc passes.
  • cargo test --lib: 908 passed.
  • termina's tests: 34 passed.

🤖 Generated with Claude Code

…istory path

A pty whose size was never set reports 0 rows and 0 columns. termina's
get_dimensions returned an error, Terminal::with_options panicked, and the
panic recovery returned EOF, which logs the shell out. Fall back to 80x24
instead.

The JSONL history path comes from dirs::data_local_dir(), which is
~/Library/Application Support on macOS, not ~/.local/share.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trancong12102
trancong12102 merged commit 8cf5358 into master Nov 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant