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

Resolve paths in config [directories] relative to the config directory (#306) #395

Merged
merged 1 commit into from
Jan 4, 2025

Conversation

MatejKafka
Copy link
Contributor

@MatejKafka MatejKafka commented Dec 8, 2024

See #306. The joined path is not cleaned in any way, so the resulting paths will not be very pretty, but since Rust stdlib afaik does not give us anything built-in for cleaning paths without touching the filesystem, I leave the paths as they are.

Copy link
Collaborator

@niklasmohrin niklasmohrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your submission, very cool!

I wonder whether having tealdeer print "/path/to/config/../cache" is actually a feature, because it makes it clear how the full path came to be - then again, the user wrote ../ in their config, so they probably have an idea about what they were doing

src/config.rs Outdated Show resolved Hide resolved
src/config.rs Outdated Show resolved Hide resolved
@MatejKafka MatejKafka force-pushed the main branch 5 times, most recently from 6ba469a to 9a542ed Compare January 2, 2025 14:19
Copy link
Collaborator

@niklasmohrin niklasmohrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, I have one last thing before we can merge :)

src/config.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@niklasmohrin niklasmohrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing and discussion! :)

@niklasmohrin niklasmohrin merged commit 00c7778 into tealdeer-rs:main Jan 4, 2025
9 checks passed
@niklasmohrin niklasmohrin added this to the v1.8.0 milestone Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants