Expand description
§jumprs
Unified API for reading and writing directory jumper databases.
Supports multiple directory jumper tools:
§Quick Start
use jumprs::Database;
// Auto-detect the first available database
let db = Database::detect().expect("no jump database found");
// Search for directories matching a query
let results = db.search("proj");
for entry in results.iter().take(5) {
println!("{}: {:.0}", entry.path.display(), entry.frecency());
}
// Get the best match
if let Some(best) = db.best_match("proj") {
println!("Best match: {}", best.path.display());
}§Recording Visits
use jumprs::{Database, Backend};
use std::path::PathBuf;
// Load or create a database
let mut db = Database::with_backend(Backend::Z).unwrap();
// Record a directory visit (updates rank and timestamp)
db.add_visit(PathBuf::from("/home/user/projects"));
// Save changes to disk
db.save().expect("failed to save database");§Specifying a Backend
use jumprs::{Database, Backend};
// Use a specific backend
let db = Database::with_backend(Backend::Z).expect("z database not found");
// Get top directories by frecency
for entry in db.top_dirs(10) {
println!("{}", entry.path.display());
}Structs§
Enums§
Type Aliases§
- Result
- Result type alias for jumprs operations