// nixos-config - My current NixOS configuration // // Copyright (C) 2025 Benedikt Peetz // SPDX-License-Identifier: GPL-3.0-or-later // // This file is part of my nixos-config. // // You should have received a copy of the License along with this program. // If not, see . use std::path::PathBuf; use crate::mapping::MapKey; use super::MappingsTrie; impl MappingsTrie { pub fn to_lf_mappings(&self, home_path: PathBuf) -> String { let mut raw = self .0 .iter() .map(|(key, value)| { format!( "map g{} cd \"{}\"\n", MapKey::display(&key), home_path.join(&value.path).display() ) }) .collect::>(); raw.sort(); raw.into_iter().collect() } }