Added hyphen support
This commit is contained in:
parent
567c2944d4
commit
91e595157c
@ -23,7 +23,7 @@ pub fn untildify(input_path: &str) -> String {
|
|||||||
return match get_host_dir() {
|
return match get_host_dir() {
|
||||||
Some(path) => {
|
Some(path) => {
|
||||||
let host_dir = path.to_str().unwrap();
|
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) {
|
match re.captures(input_path) {
|
||||||
Some(captures) => {
|
Some(captures) => {
|
||||||
return format!("{}{}", host_dir, &captures[1]);
|
return format!("{}{}", host_dir, &captures[1]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user