Package ai.wanaku.cli.main.support
Class CommandHelper
java.lang.Object
ai.wanaku.cli.main.support.CommandHelper
Utility class providing helper methods for command-line interactions.
This class offers convenient methods for prompting users for confirmation and other interactive command-line operations using JLine terminal capabilities.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CommandHelper
public CommandHelper()
-
-
Method Details
-
confirm
public static boolean confirm(org.jline.terminal.Terminal terminal, String message) throws IOException Prompts the user for confirmation to perform a certain action.- Parameters:
terminal- The JLine terminal instance.message- the message to be displayed to inform the user.- Returns:
- true if the user confirms, false otherwise.
- Throws:
IOException- if an I/O error occurs during the prompt.
-