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
Handle multi-line commands #45
Comments
Thanks for reporting this. I don't have time to look into this right now, but I would certainly review and merge a PR for this. |
This is not because of the nested quoting but because of the multiline escaped commands passed to Python shlex. |
Ah, good catch @nrvale0 . I've renamed the issue. |
The root issue is that the cli.py/run is reading the session one line at a time and then feeds each line to shlex.split(). In the situation where the command is multiline shlex is rightfully complaining that there's nothing following the line escape character. Some adjustments are necessary to the parsing logic in run()...seems like it should not be particularly difficult to add support for multiline. |
Nice package. Having a problem using it when there are single or double-quotes in either command or the comments (using commentecho: true). For instance, the following line:
cause the following backtrace:
At least in the case of comments you can avoid the backtrace by escaping the single or double quotes but then the escaping also shows up in the commentecho output.
Ideas?
The text was updated successfully, but these errors were encountered: