-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
$value in <<< $value
doesn't need to be quoted
#1009
Comments
This is true in Bash 4, but not in Bash 3.
Though I'm not necessarily saying it shouldn't be fixed. |
fwiw, the bash-4.4 man page says:
|
I was curious enough to look through Bash's changelog: the old behavior of expanding the here string is described as a bug and was fixed in bash-4.4-beta. |
I think that this should be fixed, because it's quite confusing. |
Just found the same. Interestingly in our case SC2086 is not triggered, but only SC2248 is, while the variable is dynamically generated, so can definitely contain magic characters. So either the false positive is fixed for SC2086 but not for SC2248, or it is not correctly detected that the here string variable is not assured to not contain magic characters. It the second is verified to be true, I'll create a new issue about this. EDIT: After some shellcheck update, also in our case SC2086 is now thrown. So both rules suffer from the same false positive. |
For bugs
shellcheck --version
or "online"): 0.4.4For new checks and feature suggestions
Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Line 3:
cat <<< $var
^-- SC2086: Double quote to prevent globbing and word splitting.
Here's what I wanted or expected to see:
Nothing.
The text was updated successfully, but these errors were encountered: