Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ Optionally read Zsh history entries to make migrating to Bash easier.

## Flyline JSONL history backend

Flyline can use a structured JSONL history storage backend (`~/.local/share/flyline/history.jsonl`) that you can opt to use instead `~/.bash_history`.
Flyline can use a structured JSONL history storage backend (`~/.local/share/flyline/history.jsonl` on Linux, `~/Library/Application Support/flyline/history.jsonl` on macOS) that you can opt to use instead `~/.bash_history`.

The main improvements are:
- **Real-time syncing between sessions**: Synchronize command history instantly across open terminal windows and tabs.
Expand Down
2 changes: 1 addition & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ enum Commands {
#[arg(long = "backend", value_enum)]
backend: Option<crate::settings::HistoryBackend>,

/// Specify a custom path for Flyline's JSONL history file (defaults to ~/.local/share/flyline/history.jsonl)
/// Specify a custom path for Flyline's JSONL history file (defaults to ~/.local/share/flyline/history.jsonl on Linux, ~/Library/Application Support/flyline/history.jsonl on macOS)
#[arg(long = "jsonl-path", value_name = "PATH")]
jsonl_path: Option<String>,
},
Expand Down
2 changes: 1 addition & 1 deletion src/history/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ impl HistoryManager {

/// Refreshes history entries incrementally from the active backend.
///
/// When using `HistoryBackend::Flyline`, queries ~/.local/share/flyline/history.jsonl.
/// When using `HistoryBackend::Flyline`, queries the JSONL file (see `default_jsonl_path`).
pub fn refresh_jsonl_backend(&mut self) {
let path = self.ensure_jsonl_repopulated_if_needed();
let prev_offset = self.last_jsonl_read_offset.clone();
Expand Down
2 changes: 1 addition & 1 deletion src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub use flycontent::palette::ColourTheme;
Debug, Clone, Copy, PartialEq, Eq, Default, ValueEnum, serde::Serialize, serde::Deserialize,
)]
pub enum HistoryBackend {
/// Use Flyline's JSONL history file (~/.local/share/flyline/history.jsonl).
/// Use Flyline's JSONL history file (~/.local/share/flyline/history.jsonl on Linux, ~/Library/Application Support/flyline/history.jsonl on macOS).
#[value(name = "flyline")]
#[serde(rename = "flyline")]
Flyline,
Expand Down
2 changes: 1 addition & 1 deletion vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ update them itself.
| Directory | Upstream | Base commit | flyline's changes |
|---|---|---|---|
| `ratatui/` | [ratatui/ratatui](https://github.com/ratatui/ratatui) `main` | `5a28bec1` | An inline viewport positioned relative to its top row: cursor tracked in memory and never queried, resizable height, `viewport_top` for mapping mouse rows, synchronized output, autowrap off while drawing, erase instead of spaces, cells hidden behind wide glyphs skipped, no redundant cursor show/hide (HalFrgrd/ratatui `inline_viewport_improvments`, merged with upstream; see below) |
| `termina/` | [helix-editor/termina](https://github.com/helix-editor/termina) `master` | `7be7389f` (v0.4.0) | Raw device-attribute responses and no parser deadlock on DA2/DA3 or unhandled CSI (upstream PR #32), OSC 52 replies as `Paste`, the kitty base-layout key, `PlatformTerminal::with_reader` (upstream PR #31), an event buffer that keeps arrival order, and `TCSANOW` so typed-ahead input survives entering raw mode |
| `termina/` | [helix-editor/termina](https://github.com/helix-editor/termina) `master` | `7be7389f` (v0.4.0) | Raw device-attribute responses and no parser deadlock on DA2/DA3 or unhandled CSI (upstream PR #32), OSC 52 replies as `Paste`, the kitty base-layout key, `PlatformTerminal::with_reader` (upstream PR #31), an event buffer that keeps arrival order, `TCSANOW` so typed-ahead input survives entering raw mode, and an 80x24 fallback when the terminal reports a 0x0 size |
| `skim/` | [skim-rs/skim](https://github.com/skim-rs/skim) `master` | `2160abbd` (5.9.0) | A `tui` feature, so `default-features = false, features = ["algos_only"]` builds only the matchers, without the TUI and runtime stack (HalFrgrd/skim, 1 commit) |

Each directory is a `git subtree --squash`. It holds upstream's tree at the
Expand Down
16 changes: 9 additions & 7 deletions vendor/termina/src/terminal/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,16 @@ impl Terminal for UnixTerminal {
size.cols = cols;
}
}
if size.cols == 0 || size.rows == 0 {
Err(io::Error::new(
io::ErrorKind::Other,
"cannot read non-zero cols/rows from ioctl or COLUMNS/LINES environment variables",
))
} else {
Ok(size)
// Some ptys (a freshly spawned one whose size was never set, for example) report 0x0
// with no LINES/COLUMNS either. Assume the classic 80x24 rather than failing: a line
// editor that cannot start leaves the shell with no way to read a command.
if size.cols == 0 {
size.cols = 80;
}
if size.rows == 0 {
size.rows = 24;
}
Ok(size)
}

fn event_reader(&self) -> EventReader {
Expand Down