Expand description
Skim is a fuzzy finder library for Rust.
It provides a fast and customizable way to filter and select items interactively, similar to fzf. Skim can be used as a library or as a command-line tool.
§Examples
use skim::prelude::*;
use std::io::Cursor;
let options = SkimOptionsBuilder::default()
.height(Some("50%"))
.multi(true)
.build()
.unwrap();
let input = "awk\nbash\ncsh\ndash\nfish\nksh\nzsh";
let item_reader = SkimItemReader::default();
let items = item_reader.of_bufread(Cursor::new(input));
let output = Skim::run_with(&options, Some(items)).unwrap();Re-exports§
pub use crate::item::RankCriteria;pub use crate::options::SkimOptions;
Modules§
- binds
- Key binding configuration and parsing.
- completions
- Provides helpers to easily generate shell completions
- field
- Field extraction and parsing utilities.
- fuzzy_
matcher - Fuzzy matching algorithms and implementations.
- helper
- Skim helpers
- item
- Item representation and management.
- options
- Configuration options for skim.
- prelude
- Convenience re-exports of commonly used types.
- reader
- Reader is used for reading items from datasource (e.g. stdin or command output)
- spinlock
- SpinLock implemented using AtomicBool Just like Mutex except:
- tmux
- Tmux integration utilities.
- tui
- Terminal UI components and rendering.
Macros§
- exhaustive_
match - Macro for exhaustive matching that ensures all enum variants are covered
Structs§
- Display
Context - Context information for displaying an item
- Match
Result - Result of matching a query against an item
- Preview
Context - Context information for generating item previews
- Preview
Position - Position and scroll information for preview display
- Skim
- Main entry point for running skim
- Skim
Output - Output from running skim, containing the final selection and state
Enums§
- Case
Matching - Case sensitivity mode for matching
- Fuzzy
Algorithm - Fuzzy matching algorithm to use
- Item
Preview - Defines how an item should be previewed
- Match
Range - Represents the range of a match in an item
- Matches
- Represents how a query matches an item
Traits§
- AsAny
- Trait for downcasting to concrete types from trait objects
- Match
Engine - A matching engine that can match queries against items
- Match
Engine Factory - Factory for creating match engines
- Selector
- A selector that determines whether an item should be “pre-selected” in multi-selection mode
- Skim
Item - A
SkimItemdefines what’s been processed(fetched, matched, previewed and returned) by skim
Type Aliases§
- Rank
- Rank tuple used for sorting match results
- Skim
Item Receiver - Receiver for streaming items to skim
- Skim
Item Sender - Sender for streaming items to skim