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

Writing

When something needs to get written into your console you can always use JDK’s System.out which then goes directly into JDK’s own streams. The recommended way is to use PrintWriter obtained from command context and use it for writing:

@Command
public void example(CommandContext ctx) {
	ctx.outputWriter().println("hi");
	ctx.outputWriter().flush();
}