-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change println() to println(), disable event expansion #3
Conversation
@hjafarpour LGTY? |
@hjafarpour ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The loss of that behavior seems completely ok to me and better than having to remember to escape ! (which will probably be very common).
@hjafarpour Any thoughts?
Oh, and meant to say that cleanups like removing those empty strings are very welcome. |
only thing i'd add is that it would be better to separate out the changes in to two commits. if for some reason we need to revert the functionality change, we wouldn't want to revert the style change with it |
👍 great idea @norwood |
@norwood reverted the commit and separated the two changes into different commits. |
now for me to be a super pedant. you should remove the original commit and the revert from the pr. they are states we shouldnt care about in master.
|
06a1a8f
to
c757421
Compare
I ❤️ pedantry. Look good now? |
its beautiful 😂 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Currently, queries like
SELECT * FROM orders WHERE orderunits != 5
will fail in CLI mode because JLine will attempt to expand the '!=' as an event. Disabling event expansion prevents this from happening and allows queries containing '!' to pass unchanged through the console reader to the parsing phase. The only downside I can think of is the loss of that shell-like functionality where you can use '!!' as a shortcut to represent the last command you entered and '!foo' to represent the last command you entered that started with 'foo'... probably not a huge deal, especially right now.
Also, small thing, but calls to println() with the empty string as an argument are redundant, as println() has a no-args version that does the exact same thing.