Skip to content

fix: commands without a controlling terminal, Atuin import path; release v2.0.2 - #10

Merged
trancong12102 merged 3 commits into
masterfrom
fix/version-without-tty
Nov 23, 2026
Merged

trancong12102 merged 3 commits into
masterfrom
fix/version-without-tty

Conversation

@trancong12102

@trancong12102 trancong12102 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Fix

flyline version reads terminal info through GLOBAL_EVENT_READER, which unwraps PlatformTerminal::new(). When bash has no controlling terminal, as when Claude Code or a script runs bash -ic 'flyline version', that unwrap panicked and the command printed nothing. get_term_info() now falls back to TermInfo::from_env() when /dev/tty cannot be opened. It no longer takes the reader as a parameter, so the lazy reader is only opened when a terminal exists.

Atuin import path

flyline history import with no path looked in dirs::data_local_dir()/atuin, which is ~/Library/Application Support/atuin on macOS, where Atuin never writes. It now tries $ATUIN_HOME/data, ~/.atuin/data (recent Atuin), $XDG_DATA_HOME/atuin and ~/.local/share/atuin, and names the paths it tried when none exists. Tested: it imported 14,855 entries from ~/.atuin/data into a temp JSONL.

Release

This PR also bumps the version to 2.0.2 and adds a changelog entry.

Checks

  • cargo fmt -- --check, clippy with -D warnings and rustdoc with -D warnings pass.
  • cargo test --lib: 908 passed.
  • bash -ic 'flyline version' with no controlling terminal (after setsid) now prints the version. On 2.0.1 it panicked.
  • The interactive pty smoke test still passes.

🤖 Generated with Claude Code

trancong12102 and others added 3 commits November 23, 2026 14:45
flyline version queried the terminal through GLOBAL_EVENT_READER, which
unwraps PlatformTerminal::new(). With no controlling terminal, such as
bash -ic run by a script or an agent, that panicked and printed nothing.
get_term_info now falls back to environment detection when /dev/tty
cannot be opened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
flyline history import with no path looked in dirs::data_local_dir()/atuin,
which is ~/Library/Application Support/atuin on macOS, where Atuin never
writes. Try $ATUIN_HOME/data, ~/.atuin/data (recent Atuin),
$XDG_DATA_HOME/atuin and ~/.local/share/atuin first, and name the paths
tried when none exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trancong12102 trancong12102 changed the title fix: flyline version without a controlling terminal; release v2.0.2 fix: commands without a controlling terminal, Atuin import path; release v2.0.2 Nov 23, 2026
@trancong12102
trancong12102 merged commit bd84209 into master Nov 23, 2026
7 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