In a CLI app built using picocli, what is the most appropriate way to implement an interactive confirmation?
The scenario is, when a certain command is run, I need to get a confirmation from the user to do a certain task. I used the interactive option
mentioned in the picocli documentation but it's not working as expected.
@CommandLine.Option(names = {"-c", "--copy-contract"},
description = "Do you want to copy the contract in to the project?", interactive = true, arity = "1")
boolean isCopy;
The above option doesn't seem to trigger a user input when the command is run.
Any idea?