This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Shell 3.4.1!

Reading Input

When you need to read input from the shell in your command implementation, you can do it by using the InputReader obtained from the command context:

@Command
public void example(CommandContext ctx) throws Exception {
	String name = ctx.inputReader().readInput("Enter your name: ");
	char[] chars = ctx.inputReader().readPassword("Enter new password: ");
	// do something with name and password
}