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

dmoj-cli does not use shlex #351

Closed
quantum5 opened this issue Oct 27, 2018 · 0 comments
Closed

dmoj-cli does not use shlex #351

quantum5 opened this issue Oct 27, 2018 · 0 comments

Comments

@quantum5
Copy link
Member

When a user types in a command into dmoj-cli, the command is not properly parsed shell-style to handle quotes and escapes. Instead, it is simply split using str.split on ' ':

line = command.split(' ')

This makes it very hard to deal with stuff like file names with spaces, for example. As a user, you'd expect a shell-like prompt to be able to handle shell-like quotes. We should just use shlex.split which does all the work for you.

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

No branches or pull requests

2 participants