skim 3.3.0

Fuzzy Finder in rust!
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use skim::{Skim, prelude::SkimOptionsBuilder};

// Hint: use `ps -T -p $(pgrep -f target/debug/examples/multiple_runs)` to watch threads while the
// different invocations run, and make sure none is leaking through
fn main() {
    for i in 0..3 {
        let opts = SkimOptionsBuilder::default()
            .header(format!("run {i}"))
            .build()
            .unwrap();
        let res = Skim::run_with(opts, None).unwrap();
        println!(
            "run {i}: {:?}, sleeping for 5 secs",
            res.selected_items.first().map(|x| x.output())
        );
        std::thread::sleep(std::time::Duration::from_secs(5));
    }
}