Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit the directory and show the distance #148

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Herbie34
Copy link
Contributor

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
Copy link
Contributor Author

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

@facundoolano
Copy link
Owner

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 $

@Herbie34
Copy link
Contributor Author

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...

@facundoolano
Copy link
Owner

Gotcha, let me think about this for a bit.

On Linux, components[0] is just '/',
so it might be better to also add components[1].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants