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

Show valid options in help where possible #88

Closed
notmandatory opened this issue May 2, 2022 · 6 comments · Fixed by #104
Closed

Show valid options in help where possible #88

notmandatory opened this issue May 2, 2022 · 6 comments · Fixed by #104
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@notmandatory
Copy link
Member

Anywhere where there are only a limited enum set of options, such as with the network option, we should show in the help what those options are. This is done with the possible_values structopt feature, see example in Compile command:

Compile {
        /// Sets the spending policy to compile
        #[structopt(name = "POLICY", required = true, index = 1)]
        policy: String,
        /// Sets the script type used to embed the compiled policy
        #[structopt(name = "TYPE", short = "t", long = "type", default_value = "wsh", possible_values = &["sh","wsh", "sh-wsh"])]
        script_type: String,
    },
@notmandatory notmandatory added the good first issue Good for newcomers label May 2, 2022
@notmandatory notmandatory moved this to Todo in BDK-CLI Roadmap May 24, 2022
@oleonardolima
Copy link
Contributor

@notmandatory I'm taking a look at this one, it's still up for takers?

@rajarshimaitra
Copy link
Contributor

@oleonardolima you can try to apply them on top of #104 if you are still up for it. That will be the final version of the crate after the big changes.. So you don't have to make duplicate works..

@oleonardolima
Copy link
Contributor

@rajarshimaitra great! thanks for the suggestion, I'll work on top of it.

@oleonardolima
Copy link
Contributor

oleonardolima commented Aug 1, 2022

@notmandatory @rajarshimaitra I've gone through all the available commands in the current state of #104 as Raj suggested.

But I didn't find any other than the network one that could use the possible_values, I'm not sure if I missed something 🤔

@rajarshimaitra as it's on top of #104 I opened a PR to your branch, wdyt ?

@notmandatory
Copy link
Member Author

Hi, sorry for the delay in getting to this, it's Ok if only network needs to be changed. You should be able to make your PR against the master bdk-cli branch so I can put it on our roadmap for the next release, but after raj's PRs are in you'll need to rebase your PR for this issue to pick up his changes before we can merge it. Thanks!

@notmandatory notmandatory added this to the Release 0.6.0 milestone Aug 25, 2022
@oleonardolima
Copy link
Contributor

@notmandatory no problem 😁 , actually Raj got the commit 2999a3d with the changes into the branch for #104.

@rajarshimaitra rajarshimaitra linked a pull request Sep 19, 2022 that will close this issue
3 tasks
Repository owner moved this from Todo to Done in BDK-CLI Roadmap Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants