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

Tilde expansion in switch word in assignment #47

Open
magicant opened this issue Jun 5, 2021 · 0 comments
Open

Tilde expansion in switch word in assignment #47

magicant opened this issue Jun 5, 2021 · 0 comments

Comments

@magicant
Copy link
Owner

magicant commented Jun 5, 2021

Should tildes in a=${b-~:~} be parsed as tilde expansions or literal characters? Existing shells seem disagree.

$ shells -c 'HOME=HOME; a=${b-~:~}; echo "$a"'
==> bash <==
HOME:HOME

==> bash --posix <==
HOME:~

==> dash <==
HOME:HOME

==> ksh <==
HOME:~

==> mksh <==
HOME:HOME

==> mksh -o posix <==
HOME:HOME

==> mksh -o sh <==
HOME:HOME

==> yash <==
~:~

==> yash -o posix <==
~:~

==> zsh <==
HOME:HOME

==> zsh --emulate sh <==
~:~

==> zsh --emulate ksh <==
~:~
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

No branches or pull requests

1 participant