Skip to content
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

Associative array access with concatenated keys without quotes fails to parse #268

Open
Popkornium18 opened this issue Jul 8, 2024 · 0 comments

Comments

@Popkornium18
Copy link

This valid bash snippet fails to parse correctly.

#!/bin/bash
declare -A things=( ["FOO"]=41 ["FOO BAR"]=42 )
declare foo=FOO
declare bar=BAR
echo "${things[$foo]}" # Works
echo "${things["$foo $bar"]}" # Works
echo "${things[$foo $bar]}" # Doesn't work
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