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

Implement tilde expansion for path env #72

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

Xaeroxe
Copy link
Collaborator

@Xaeroxe Xaeroxe commented Jun 11, 2023

Fixes #71 by expanding tilde (~) to the value of the home directory. Emulates the bash approach to tilde expansion.

This PR intentionally ignores the more complicated parts of how bash expands the tilde character, because I feel that path resolution using the PATH environment variable should not rely on any information about the current directory, or about the previous current directory. So, ~/dir works, ~+/dir does not.

@Xaeroxe Xaeroxe force-pushed the tilde-expansion branch 2 times, most recently from dd2b7bb to e52027c Compare June 11, 2023 16:41
@Xaeroxe Xaeroxe requested a review from harryfei June 23, 2023 04:42
@Xaeroxe
Copy link
Collaborator Author

Xaeroxe commented Aug 30, 2023

Hey @harryfei I'd like to reduce how much I need to bother you for the which-rs repo. To that end I was wondering if you could give me owner access to the crates.io listing for the crate.

If that's not something you're comfortable doing I understand. Maybe you can help me get this PR code reviewed and published in that case?

@harryfei
Copy link
Owner

Sure, I can. I have send a owner invite to "Xaeroxe" in crates.io.
Feel free to review any PRs, merge them and update which-rs new version.
I'm so busy at my life and work. Thank you for your contribution to this project.

@Xaeroxe

@Xaeroxe Xaeroxe merged commit 11952d4 into harryfei:master Aug 31, 2023
12 checks passed
@Xaeroxe Xaeroxe deleted the tilde-expansion branch August 31, 2023 14:35
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.

Parsing tilde in PATH
2 participants