2 stable releases

Uses old Rust 2015

2.0.0 Jun 3, 2020
1.0.0 Oct 20, 2017
Download history 95/week @ 2023-01-21 55/week @ 2023-01-28 55/week @ 2023-02-04 50/week @ 2023-02-11 67/week @ 2023-02-18 37/week @ 2023-02-25 57/week @ 2023-03-04 34/week @ 2023-03-11 42/week @ 2023-03-18 12/week @ 2023-03-25 30/week @ 2023-04-01 33/week @ 2023-04-08 17/week @ 2023-04-15 14/week @ 2023-04-22 74/week @ 2023-04-29 70/week @ 2023-05-06

176 downloads per month
Used in 4 crates

MIT license

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

~62–275KB