Skip to content

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 certik and wolfv 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 <ondrej@certik.us>
Copy link
Collaborator

@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
Collaborator

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
@certik certik deleted the parser_tilde_expansion branch September 8, 2024 16:45
@certik
Copy link
Collaborator

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.

3 participants