-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2250
Joachim Ansorg edited this page Nov 12, 2021
·
4 revisions
This is an optional suggestion. It must be explicitly enabled with a directive enable=require-variable-braces
in a # shellcheck
comment or .shellcheckrc
partial_path='example'
curl "http://example.com/$partial_path_version/explain.html"
partial_path='example'
curl "http://example.com/${partial_path}_version/explain.html"
If a variable gets called, and there is a string that gets appended to the variable that could get misinterpreted as possibly part of the name of the variable. Then it will not call the right variable.