Open naegling opened 2 years ago
Well, that's annoying. I just noticed that the first argument to applytags has to be an added tag. Otherwise, its interpreted as a (invalid) command line option.
hehe yes, lols. never thought of that :D
This is a really nice idea, I've also hit the tags affecting the wrong thread after a refresh.
Well, that's annoying. I just noticed that the first argument to applytags has to be an added tag. Otherwise, its interpreted as a (invalid) command line option.
Suppressing the option interpretation looks both invasive and hacky. Currently, I see 2 options for more consistent syntax. to remove the dick tag and add the jane tag:
applytags + -dick +jane
.applytags -ops -dick +jane
. The option name could be optional, so that applytags +jane -dick
would still work as before.Comments Welcomed!
Currently, I see 2 options for more consistent syntax. to remove the dick tag and add the jane tag:
--
to denote the end of an option list? I think argparse
handles that as expected, per the documentation @ https://docs.python.org/3/library/argparse.html#arguments-containing. So that would become applytags -- -dick +jane
. This should have the semantics of your 2. without needing code handling in alot itself.I doubt people would mistake that as trying to remove the -
tag as first argument.
Both the OP and my own issue involved atomically adding and removing tags that could effect the contents of search. This patch adds a new command
applytags
with arguments formatted as innotmuch tag
command.The OP's example:
could be configured as: