The command prompt reads one string and clap reads an argv, so a line has to be tokenised before anything can parse it: `comment 1b78a24 the offset was never passed` split on whitespace is five arguments and `comment` takes two. One pure function over the line and the cursor, in a module of its own rather than in tui.rs. The rules are the shell's, because that is what the prompt promises. Two answers a shell's own splitter does not owe anybody come out of the same scan: what a half-typed line is still inside, as a state to report rather than an error to raise, and which argument the cursor is in with whether it begins one. Nothing calls it yet. The prompt that will is 3686dd6, and the dead_code allow on the module goes when it lands. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
23 lines
641 B
TOML
23 lines
641 B
TOML
[package]
|
|
name = "worklane"
|
|
version = "0.32.14"
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
clap = { version = "4", features = ["derive"] }
|
|
anyhow = "1"
|
|
uuid = { version = "1", features = ["v4"] }
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
libc = "0.2"
|
|
# unstable-rendered-line-info for Paragraph::line_count, which is how the detail view
|
|
# knows where its text ends. Counting the wrapping by hand would only agree with the
|
|
# widget until one of us changed.
|
|
ratatui = { version = "0.29", features = ["unstable-rendered-line-info"] }
|
|
crossterm = "0.28"
|
|
clap_complete = "4.6.9"
|
|
|
|
[dev-dependencies]
|
|
assert_cmd = "2"
|
|
assert_fs = "1"
|
|
tempfile = "3"
|