implemented (separate) punctuation-style for stack and bookmarks

This commit is contained in:
2025-01-15 00:11:54 +01:00
parent b0e2e430b5
commit 39ad2de67c
7 changed files with 38 additions and 145 deletions
+19
View File
@@ -0,0 +1,19 @@
use std::{
io::Result,
path::{Component, PathBuf},
};
pub fn to_lexical_absolute(path: PathBuf) -> Result<PathBuf> {
let mut absolute = if path.is_absolute() {
std::path::PathBuf::new()
} else {
std::env::current_dir()?
}; for component in path.components() {
match component {
Component::CurDir => {},
Component::ParentDir => { absolute.pop(); },
component @ _ => absolute.push(component.as_os_str()),
}
}
Ok(absolute)
}