beryx / text-io

A library for creating interactive console applications in Java
http://text-io.beryx.org/
Apache License 2.0
342 stars 45 forks source link

Disable Event Expansion for Strings Containing Exclamation Marks '!' #25

Closed els-chinnr closed 4 years ago

els-chinnr commented 4 years ago

I've found text-io to be very useful while building a console based application but have run into an issue when using StringInputReader().

If a string is entered which contains '!' e.g. 'sometext!somemoretext', then jline.console.ConsoleReader attempts to expand events from the string which raises an exception...

java.lang.IllegalArgumentException: !somemoretext: event not found

...is it possible to disable event expansion for a StringInputReader, as this is not required for my application?

siordache commented 4 years ago

I just released the version 3.4.1, where the event expansion is disabled by default. (You can enable it back by settting the system property 'jline.expandevents' to 'true'.)