Skip to main content

Crate prefixe

Crate prefixe 

Source

Structs§

AuditState
Snapshot of prefix learning state for display / operator tooling.
FilePrefixStore
File-backed implementation reading ~/.config/rx/prefixes.toml.
FileProbeStore
File-backed probe store at .ctx/candidates.toml.
PrefixConfig
Mirrors the ~/.config/rx/prefixes.toml schema.
ProbeEntry
A pending candidate probe: we applied a speculative prefix and need post-hook learning to confirm or discard it.
RewriteResult
Result of rewriting a full command string.
Segment
One shell segment plus the separator that followed it (if any).

Enums§

PrefixMatch
Result of a prefix lookup for a single segment’s base command.

Traits§

PrefixStore
Port for reading and writing the prefix config.
ProbeStore
Port for reading and writing candidate probes.

Functions§

audit_state
Assemble the current prefix learning state from both stores.
lookup_prefix
Look up the prefix for the leading command word(s) of segment.
rejoin
Reconstruct the original command string from segments.
rewrite_command
Rewrite cmd by prepending learned prefixes to each shell segment.
split_segments
Split a shell command string into segments on &&, ||, ;, |.