In the link to event designators for bash Event-Designators , it says the following of !:
Start a history substitution, except when followed by a space, tab, the end of the line, ‘=’ or ‘(’ (when the extglob shell option is enabled using the shopt builtin).
Is it possible to support to these exception likes "!", "!=" and "!" to not invoke the history substitution in ConsoleReader.expandEvents()?
In our application, we use "!=" in command line, it invoke the history event designators and cause the error, so for now I have to disable the expandEvents.