use std::path::PathBuf; use crate::mapping::MapKey; use super::MappingTree; impl MappingTree { pub fn to_lf_mappings(self, home_path: PathBuf) -> String { let mut raw = self .iter(true) .map(|(key, value)| { format!( "map g{} cd \"{}\"\n", MapKey::display(&key), home_path.join(&value).display() ) }) .collect::>(); raw.sort(); raw.into_iter().collect() } }