We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
This bug is serious if it's enabled "format on save" feature.
associative_array=( [hyphened-key]=value ... )
would be formatted as
associative_array=( [hyphened - key]=value ... )
for shell scripts which breaks 1 single key into 3.
Thanks and regards, Alan
The text was updated successfully, but these errors were encountered:
This is a known upstream bug caveat.
The shfmt README lists this as a caveat, and suggests:
When indexing Bash associative arrays, always use quotes.
demonstration:
# key surrounded with 'single quotes' $ echo "array=(['hyphened-key']=value )" | shfmt array=(['hyphened-key']=value) # key with "double quotes" $ echo 'array=(["hyphened-key"]=value )' | shfmt array=(["hyphened-key"]=value)
Sorry, something went wrong.
No branches or pull requests
Hello,
This bug is serious if it's enabled "format on save" feature.
would be formatted as
for shell scripts which breaks 1 single key into 3.
Thanks and regards,
Alan
The text was updated successfully, but these errors were encountered: