aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--quarg/main.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/quarg/main.py b/quarg/main.py
index 410306a..cbd5177 100644
--- a/quarg/main.py
+++ b/quarg/main.py
@@ -14,7 +14,6 @@ from quarg.quassel.formatter import format_from
from quarg.utils import errx
# TODO Make --after/--before and --around mutually exclusive
-# FIXME why need default=None for --joined/--no-joined?
# pylint: disable=line-too-long
cli = argparse.ArgumentParser()
@@ -29,11 +28,13 @@ cli.add_argument('-u', action='append', dest='user', help='match messages receiv
cli.add_argument('-t', action=actions.ParseMessageType, dest='msgtype', help='match messages of this message type')
cli.add_argument('-f', action=actions.ParseMessageFlag, dest='msgflag', help='match messages with this flag')
cli.add_argument('-p', action='append', dest='prefix', help='match nicks with this prefix')
-cli.add_argument('--joined', default=None, action='store_true', dest='joined', help='match messages sent to channels which are currently joined')
-cli.add_argument('--no-joined', default=None, action='store_false', dest='joined', help='match messages sent to channels which are not currently joined')
cli.add_argument('--after', action=actions.ParseDate, metavar='DATE', help='match messages sent after this date')
cli.add_argument('--before', action=actions.ParseDate, metavar='DATE', help='match messages sent before this date')
cli.add_argument('--around', action=actions.ParseAround, metavar='DATE', help='match messages sent within 12 hours of this date')
+
+joined_group = cli.add_mutually_exclusive_group()
+joined_group.add_argument('--joined', default=None, action='store_true', dest='joined', help='match messages sent to channels which are currently joined')
+joined_group.add_argument('--no-joined', default=None, action='store_false', dest='joined', help='match messages sent to channels which are not currently joined')
# pylint: enable=line-too-long
Session = sessionmaker()