diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/ShellCommand.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/ShellCommand.java index f567b74a35..af971e49ad 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/ShellCommand.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/ShellCommand.java @@ -105,6 +105,9 @@ public class ShellCommand extends AbstractCommand { ConsoleReader reader = new ConsoleReader(); reader.addCompleter(new CommandCompleter(reader, this.springCli)); reader.setHistoryEnabled(true); + // Prevent exceptions if user types !foo. If anyone knows how to process those + // exceptions, please help out and write some code. + reader.setExpandEvents(false); reader.setCompletionHandler(new CandidateListCompletionHandler()); return reader; }