Skip to content

interp: unset positional parameters are not considered unset #1162

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

Closed
koonix opened this issue May 26, 2025 · 0 comments
Closed

interp: unset positional parameters are not considered unset #1162

koonix opened this issue May 26, 2025 · 0 comments

Comments

@koonix
Copy link

koonix commented May 26, 2025

This behavior is at least inconsistent with bash and dash.

echo ${1?} # should complain, but does not
echo ${1-hello} # should echo hello, but does not
set -u
echo $1 # should complain, but does not
echo success.

https://go.dev/play/p/2JSDtp-5w7M

@mvdan mvdan closed this as completed in 1312ae5 May 28, 2025
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