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

feat: change generated variables for prefixed options #297

Merged
merged 2 commits into from
Feb 5, 2024
Merged

Conversation

sigoden
Copy link
Owner

@sigoden sigoden commented Feb 5, 2024

prefixed options will export associate arrays.

# @option -o-
# @option -D-*
$ prog -o3 -Dv1=foo -Dv2 bar
argc_D=([v2]="bar" [v1]="foo" )
argc_o=([3]="1" )
$ argc --argc-eval prog.sh -o3 -Dv1=foo -Dv2 bar
...
declare -A argc_o
argc_o["3"]=1
declare -A argc_D
argc_D["v1"]=foo
argc_D["v2"]=bar
...

@sigoden sigoden changed the title feat: update variables for prefixed options feat: update generated variables for prefixed options Feb 5, 2024
@sigoden sigoden changed the title feat: update generated variables for prefixed options feat: change generated variables for prefixed options Feb 5, 2024
@sigoden sigoden merged commit 6664d8f into main Feb 5, 2024
@sigoden sigoden deleted the feat-prefixed branch February 5, 2024 23:23
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.

1 participant