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

Use global for cast common arguments using clap #2492

Closed
cptartur opened this issue Sep 20, 2024 · 0 comments · Fixed by #2529
Closed

Use global for cast common arguments using clap #2492

cptartur opened this issue Sep 20, 2024 · 0 comments · Fixed by #2529
Assignees
Labels
feature New feature request/description sncast

Comments

@cptartur
Copy link
Member

Which components does the task require to be changed? (think hard pls)

sncast

Description

It should be possible to pass common arguments both before and after subcommand name, e.g. both sncast --account default declare --contract_name name ... and sncast declare --account default --contract_name name ... should be allowed.

This can be achieved using this method https://docs.rs/clap/latest/clap/struct.Arg.html#method.global

@github-actions github-actions bot added the new label Sep 20, 2024
@cptartur cptartur added sncast feature New feature request/description and removed new labels Sep 20, 2024
@franciszekjob franciszekjob self-assigned this Sep 25, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 30, 2024
<!-- Reference any GitHub issues resolved by this PR -->

Closes #2492 

## Introduced changes

Allow common arguments to be used after subcommand.



## Checklist

<!-- Make sure all of these are complete -->

- [x] Linked relevant issue
- [x] Updated relevant documentation
- [x] Added relevant tests
- [x] Performed self-review of the code
- [x] Added changes to `CHANGELOG.md`

---------

Co-authored-by: Artur Michałek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request/description sncast
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants