-
Notifications
You must be signed in to change notification settings - Fork 98
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
Shell quote mail folder #218
Conversation
need to be un-quoted again, as >>> import shlex
>>> print(shlex.quote("foo"))
foo
>>> print(shlex.quote("foo\""))
'foo"' |
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.
self.query
needs to be unquoted again (see previous comment)
Follow on to PR afewmail#216: In cases where the folder name contains characters that should be quoted, use the `shlex.quote()` function to properly format the folder name. Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
You are right, I missed that. It's fixed now. |
Thanks! |
@flokli For some reason this is not working. With this PR the search query does not return anything. Running
But running that query in the shell works:
Interestingly, when I revert the self.query = "folder:'{folder}' AND {subquery}" I get the same result as with this PR, i.e. the query does not return anything. The failure is reproducible with single quotes but I don't understand why. Do you have any suggestions? |
shlex.quote quoted with single quotes, which is not supported by notmuch, so we have to quote and escape on our own followup of afewmail#218 (comment)
shlex.quote quoted with single quotes, which is not supported by notmuch, so we have to quote and escape on our own followup of afewmail#218 (comment)
shlex.quote quoted with single quotes, which is not supported by notmuch, so we have to quote and escape on our own followup of afewmail#218 (comment)
shlex.quote quoted with single quotes, which is not supported by notmuch, so we have to quote and escape on our own followup of #218 (comment)
Follow on to PR #216:
In cases where the folder name contains characters that should be
quoted, use the
shlex.quote()
function to properly format the foldername.
Signed-off-by: Nicolas Bock nicolasbock@gmail.com