Skip to content
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

command parser allows unclosed quoted strings (in the example complete.cpp) #195

Open
yurivict opened this issue Mar 17, 2023 · 1 comment

Comments

@yurivict
Copy link

For example, the first 3 of these queries are processed incorrectly:

cli> add 1 2 "3
1 + 2 + 3 = 6
cli> add 1 2 '3
1 + 2 + 3 = 6
cli> add 1 2 '''3
1 + 2 + 3 = 6
cli> add 1 2 1'''3
wrong command: add 1 2 1'''3
cli> 

Version: 2.0.2
FreeBSD 13.1

@daniele77
Copy link
Owner

Yes, currently it treats an unclosed quoted string as closed at the end of the line.
Actually, it can be considered a feature. The alternative would be outputting a "wrong command" error, but I don't think it would be really a better behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants