2 stable releases
Uses old Rust 2015
2.0.0 | Jun 3, 2020 |
---|---|
1.0.0 | Oct 20, 2017 |
#13 in #shortener
57 downloads per month
Used in 4 crates
5KB
75 lines
The best README is probably the test cases:
#[test]
fn it_works() {
assert_eq!(tico("~"), "~");
assert_eq!(tico("/"), "/");
assert_eq!(tico("/home/hugopeixoto/work/personal/tico"), "/h/h/w/p/tico");
assert_eq!(tico("~/work/personal/tico"), "~/w/p/tico");
assert_eq!(tico("~/work/personal/tico/"), "~/w/p/t/");
assert_eq!(tico("~/work/ééé/tico"), "~/w/é/tico");
}
Install
$ cargo install --git git@github.com:portocodes/tico.git
Use
Here's how I'm using it in fish_prompt.fish
to replace prompt_pwd
:
set -l cwd $cyan(tico (echo $PWD | sed -e "s|^$HOME|~|"))
Dependencies
~65–520KB