use std::path::PathBuf;
fn parse_tilde(path: &str) -> String {
let path = tilde_expand::tilde_expand(path.as_bytes());
String::from_utf8(path).unwrap()
}
pub trait PathExpandUser {
fn expanduser(&mut self);
}
impl PathExpandUser for PathBuf {
fn expanduser(&mut self) {
let path = tilde_expand::tilde_expand(self.to_str().unwrap().as_bytes());
let path = String::from_utf8(path).unwrap();
let path = Self::from(path);
*self = path;
}
}