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

osh doesn't expand tilde in assignment #1862

Closed
oguz-ismail opened this issue Mar 10, 2024 · 3 comments
Closed

osh doesn't expand tilde in assignment #1862

oguz-ismail opened this issue Mar 10, 2024 · 3 comments
Assignees

Comments

@oguz-ismail
Copy link

See:

$ osh -c 'x=~ env | grep ^x='
x=~

POSIX says

In an assignment (see XBD Section 4.26), multiple tilde-prefixes
can be used: one at the beginning of the word (that is, following the of the
assignment), or one following any unquoted <colon>, or both. A tilde-prefix in an assignment is
terminated by the first unquoted <colon> or <slash>, or the end of the assignment word.

Which is what every other shell does.

@AtomsForPeace AtomsForPeace self-assigned this Mar 14, 2024
andychu pushed a commit that referenced this issue Mar 15, 2024
andychu pushed a commit that referenced this issue Mar 15, 2024
@andychu
Copy link
Contributor

andychu commented Mar 15, 2024

Great report, thank you! This is now fixed and will be out with the next release.

New spec test here, case 13 was failing before the fix - http://travis-ci.oilshell.org/github-jobs/6482/ovm-tarball.wwz/_tmp/spec/osh-py/tilde.html

@andychu
Copy link
Contributor

andychu commented Mar 22, 2024

@AtomsForPeace - I pushed a fix for this

I put some more stuff on #help-wanted in Zulip -- feel free to ask questions about any issue. Thank you for the help!

@andychu
Copy link
Contributor

andychu commented Jun 20, 2024

@andychu andychu closed this as completed Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants