close
Skip to content

expand: improve support for array keys and values#893

Merged
mvdan merged 1 commit into
masterfrom
884-arrays
Jul 3, 2022
Merged

expand: improve support for array keys and values#893
mvdan merged 1 commit into
masterfrom
884-arrays

Conversation

@mvdan
Copy link
Copy Markdown
Owner

@mvdan mvdan commented Jun 29, 2022

(see commit message)

Fixes #884.

That is, add support for "${array[@]}" for associative arrays,
as well as "{!array[@]}" for indexed and associative arrays.

We also add support for positional parameters in indirections,
so that ${!@}, ${!*}, and ${!1} work the same as Bash.

As usual, with plenty of tests.

Fixes #884.
@mvdan
Copy link
Copy Markdown
Owner Author

mvdan commented Jun 29, 2022

cc @everactivetim @ghostsquad

@everactivetim
Copy link
Copy Markdown

Thanks @mvdan! I've confirmed the branch outputs the expected results locally.

@mvdan mvdan merged commit b37fb54 into master Jul 3, 2022
@mvdan mvdan deleted the 884-arrays branch July 3, 2022 15:04
@andreynering
Copy link
Copy Markdown
Collaborator

Thanks @mvdan!

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

Successfully merging this pull request may close these issues.

Bug for associative arrays when using gosh with -c vs without

4 participants