rpg-cli icon indicating copy to clipboard operation
rpg-cli copied to clipboard

Omit the directory and show the distance

Open Herbie34 opened this issue 1 year ago • 4 comments

I've completed all the quests! The game balance was perfect, and I really enjoyed it.

By the way, I was wondering if it's fine to omit the display of the current directory. Also, I thought it might be a good idea to show the distance. What do you think? (I don't have any experience with Rust development, so I apologize if anything is incorrect.)

Herbie34 avatar Sep 26 '24 05:09 Herbie34

On Linux, components[0] is just '/', so it might be better to also add components[1].

Herbie34 avatar Sep 26 '24 11:09 Herbie34

Can you show some before/after examples of this?

Perhaps a better option than the ... would be to show a compact version of the path segments, eg. my shell prompt does something like this: ~/d/f/o/t/assets $

facundoolano avatar Sep 26 '24 15:09 facundoolano

Before(use dn and rpg status): warrior[100]@~/dungeon/1/2/3/4/5 ...

After(add components[1]): warrior[100]@~/dungeon/.../5[6] ...

It might be a good idea to display only the first character of each directory, but I thought it might get quite long when you go deep into directories for quests...

Herbie34 avatar Sep 26 '24 16:09 Herbie34

Gotcha, let me think about this for a bit.

facundoolano avatar Sep 26 '24 16:09 facundoolano