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

Alternative implementation for Tilde expansion #85

Merged
merged 6 commits into from
Sep 8, 2024

Conversation

prsabahrami
Copy link
Contributor

@prsabahrami prsabahrami commented Sep 8, 2024

As an alternative to #49. The tilde_prefix is being parsed at parser level which then results in an AST Node being created containing the user. (If the ~ should be expanded to $HOME, then the user is empty)
And then ~ is expanded later.

Note:~user is not supported yet.

@prsabahrami prsabahrami requested review from wolfv and certik September 8, 2024 15:54
@prsabahrami prsabahrami changed the title Inital implementation for Tilde expansion Initial implementation for Tilde expansion Sep 8, 2024
@prsabahrami prsabahrami changed the title Initial implementation for Tilde expansion Alternative implementation for Tilde expansion Sep 8, 2024
Co-authored-by: Ondřej Čertík <[email protected]>
Copy link
Contributor

@certik certik left a comment

Choose a reason for hiding this comment

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

I think this looks good now. I'll let @wolfv to do the final review before merge.

The test does not run at the CI, correct? That is #82, that we should fix soon, but we can merge this PR first.

@prsabahrami
Copy link
Contributor Author

I think this looks good now. I'll let @wolfv to do the final review before merge.

The test does not run at the CI, correct? That is #82, that we should fix soon, but we can merge this PR first.

Great!
Yes, testing needs improvement and the scripts are not running at CI.

@certik
Copy link
Contributor

certik commented Sep 8, 2024

I tested this on Windows and Linux, it works with ls and cd and it seems to work very well. I am going to merge this, and we can improve upon this with subsequent PRs. One issue I already identified: #87.

@certik certik merged commit b77493a into main Sep 8, 2024
4 checks passed
@certik certik deleted the parser_tilde_expansion branch September 8, 2024 16:45
@certik
Copy link
Contributor

certik commented Sep 8, 2024

Thanks @prsabahrami for implementing this!

@prsabahrami
Copy link
Contributor Author

My pleasure! @certik

@certik certik mentioned this pull request Sep 8, 2024
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