Closed nazmulidris closed 1 year ago
Can you assign this to me?
@abhiramtilakiiit of course, all yours.
Please let us know if your have any questions as you explore. You can also ask questions on the contributors discord https://discord.gg/RAbjRr3kds
Current behavior
When a user runs
ockam vault show
without any arguments, currently they are shown an error if there are no vaults:Or the default vault if there is a default one:
Desired behavior
Change the behavior of this command so that it becomes interactive with the user when no arguments are passed. Note that this can only be allowed to happen if:
--no-input
or--quiet
flags have not been passed, and,This what the user flow should look like in interactive mode.
1) Use the tuify crate's
select_from_list()
function to ask the user to select from a list of vault names. They should be able to make multiple selections. If there are none, then simply display a message saying that none exist (not an error) and exit.2) Once the user has made their selection(s), then run
show
for each selected vault, and display the results of theshow
command for each vault that they've selected.Implementation details
Please use the functions
select_multiple
, andconfirm_interactively
in this file.Here's a similar PR to get some ideas from: https://github.com/build-trust/ockam/pull/6480
You can learn more about how to use the
select_from_list()
in the tuify crate here. Here is an example that is very similar to the steps you might have to take for this issue.Here's a file you can look at to detect when a terminal is interactive or not.
Here's a file you can look at to see where the
ockam vault show
command is implemented.We love helping new contributors! ❤️ If you have questions or need help as you explore, please join us on Discord. If you're looking for other issues to contribute to, please checkout our good first issues.