From 91e595157c9720d4fb5c50595e7f601473066de2 Mon Sep 17 00:00:00 2001 From: Benjamyn Love Date: Thu, 5 Dec 2024 19:14:11 +1100 Subject: [PATCH] Added hyphen support --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 3fcf0b4..fcb1f05 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -23,7 +23,7 @@ pub fn untildify(input_path: &str) -> String { return match get_host_dir() { Some(path) => { let host_dir = path.to_str().unwrap(); - let re = Regex::new(r"^~([/\w.]+)").unwrap(); + let re = Regex::new(r"^~([/\w.-]+)").unwrap(); match re.captures(input_path) { Some(captures) => { return format!("{}{}", host_dir, &captures[1]);