Repository navigation
fix: commands without a controlling terminal, Atuin import path; release v2.0.2 - #10
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix
flyline versionreads terminal info throughGLOBAL_EVENT_READER, which unwrapsPlatformTerminal::new(). When bash has no controlling terminal, as when Claude Code or a script runsbash -ic 'flyline version', that unwrap panicked and the command printed nothing.get_term_info()now falls back toTermInfo::from_env()when/dev/ttycannot 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 importwith no path looked indirs::data_local_dir()/atuin, which is~/Library/Application Support/atuinon macOS, where Atuin never writes. It now tries$ATUIN_HOME/data,~/.atuin/data(recent Atuin),$XDG_DATA_HOME/atuinand~/.local/share/atuin, and names the paths it tried when none exists. Tested: it imported 14,855 entries from~/.atuin/datainto 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 warningsand rustdoc with-D warningspass.cargo test --lib: 908 passed.bash -ic 'flyline version'with no controlling terminal (aftersetsid) now prints the version. On 2.0.1 it panicked.🤖 Generated with Claude Code