#utility #tilde #untildify

untildify

Utility to replace ~ with user home directory

2 releases

0.1.1 Jul 11, 2022
0.1.0 Sep 19, 2021

#889 in Development tools

Download history 56/week @ 2022-11-27 20/week @ 2022-12-04 11/week @ 2022-12-11 31/week @ 2022-12-18 40/week @ 2022-12-25 30/week @ 2023-01-01 25/week @ 2023-01-08 57/week @ 2023-01-15 27/week @ 2023-01-22 56/week @ 2023-01-29 22/week @ 2023-02-05 66/week @ 2023-02-12 19/week @ 2023-02-19 25/week @ 2023-02-26 17/week @ 2023-03-05 20/week @ 2023-03-12

103 downloads per month
Used in aim

MIT license

4KB
58 lines

untildify

Utility to replace ~ with user home directory

Example

extern crate untildify;

fn main() {
  println!("Untildify : {}", untildify::untildify("~/Desktop"));
  // prints /Users/<user_name>/Desktop
  
  // Other Examples
  assert_eq!(untildify("~/a/b/c/d/e"), "/User/Untildify/a/b/c/d/e");
  assert_eq!(untildify("~/"), "/User/Untildify/");
}

Dependencies

~0.9–1.3MB
~37K SLoC