-
Notifications
You must be signed in to change notification settings - Fork 8
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
set -- mistakenly outputs shell variables and shell functions #339
Comments
Thanks for filing this issue. This one may be tricky, as we're relying on the clap-rs command-line parser to parse arguments for built-in commands; unfortunately, I don't think there's any way for our code to distinguish between We'll need to think on this for a bit. (For posterity, note that these two command-lines also have different side effects; |
Thanks for reporting this issue! After some thought (and investigation), it looks like we can use the same workaround that had been done for |
Apparently, a small issue remains. $ brush --version
brush 0.2.14 (git:cf45a9f)
$ brush -c 'set -- a ${1:-+}; echo "$@"'
a --+
$ bash -c 'set -- a ${1:-+}; echo "$@"'
a + FYI. This bug was accidentally discovered because the 63rd customizable character in base64 is |
You're right! We have some logic to work around clap-rs's limitations in supporting + options. It sounds like that workaround is incorrectly getting applied to the positional arguments. I'll reactivate this issue and look at addressing this. Thanks again for the clear details. |
set --
must clear positional parameters.The text was updated successfully, but these errors were encountered: