Skip to main content

Crate prefixe

Crate prefixe 

Source

Re-exports§

pub use domain::CommandRewriter;
pub use domain::CommandSplitter;
pub use domain::OriginalCommand;
pub use domain::PrefixConfig;
pub use domain::TextualSplitter;
pub use engine::PrefixEngine;
pub use error::Error;
pub use infra::path::EnvPathResolver;
pub use infra::path::PathResolver;
pub use infra::toml_store::FilePrefixStore;
pub use infra::toml_store::FileProbeStore;

Modules§

domain
engine
error
infra

Structs§

AuditState
Snapshot of prefix learning state for display / operator tooling.
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.
rewrite_via_store
Rewrite cmd using the given store as the prefix source.
split_segments
Split a shell command string into segments on &&, ||, ;, |.