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

[core refactor] Refactor the code for BashArray/BashAssoc unset -v a[i] #2161

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

akinomyoga
Copy link
Collaborator

This moves the codes for unset -v 'a[i]'.

@akinomyoga akinomyoga changed the base branch from master to soil-staging December 1, 2024 17:07
@akinomyoga akinomyoga changed the title [core refactor] Refactor the code for Bash/ArrayBashAssoc unset -v a[i] [core refactor] Refactor the code for BashArray/BashAssoc unset -v a[i] Dec 1, 2024
@akinomyoga akinomyoga force-pushed the BashArray_UnsetElement branch from 1f28a9d to dc2898c Compare December 1, 2024 17:21
@akinomyoga
Copy link
Collaborator Author

Two different array lengths

One is the number of elements obtained by ${#arr[@]}. The other is the max index plus one, which is used to locate the element specified by a negative index. Currently, the former is obtained by BashArray_Length. I would like to add a function to get the latter. How should I name these functions? Or, to ask differently, how should we call these two types of array lengths by distinct names?

@akinomyoga akinomyoga marked this pull request as draft December 1, 2024 17:49
@andychu andychu deleted the branch soil-staging December 1, 2024 18:37
@andychu andychu closed this Dec 1, 2024
@akinomyoga akinomyoga reopened this Dec 1, 2024
@andychu
Copy link
Contributor

andychu commented Dec 1, 2024

Oh sorry I had to delete the soil-staging branch for a different reason, and that meant PRs were deleted I think

@akinomyoga
Copy link
Collaborator Author

I think #1958 is also a PR that was automatically closed by GitHub. I reopened it.

@akinomyoga
Copy link
Collaborator Author

I'll rework on this PR after #2163 is settled.

@akinomyoga akinomyoga force-pushed the BashArray_UnsetElement branch from dc2898c to 5eca289 Compare December 2, 2024 01:11
@akinomyoga akinomyoga force-pushed the BashArray_UnsetElement branch from 5eca289 to 1791139 Compare December 2, 2024 01:17
@akinomyoga akinomyoga marked this pull request as ready for review December 2, 2024 01:17
@andychu andychu merged commit 8b88b12 into soil-staging Dec 2, 2024
18 checks passed
@andychu
Copy link
Contributor

andychu commented Dec 2, 2024

Thanks!

@akinomyoga
Copy link
Collaborator Author

Thanks

@akinomyoga akinomyoga deleted the BashArray_UnsetElement branch December 2, 2024 02:07
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.

2 participants