From 512d8ce79fe8ff5785081906349a19ea4c930729 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Wed, 3 Jan 2024 10:56:06 +0100 Subject: [PATCH] Allow address_book as field for list -F This adds the special field "address_book" to the valid fields that can be selected with the --format option. Fix #331. --- khard/cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/khard/cli.py b/khard/cli.py index 820fb0a..2e87f5d 100644 --- a/khard/cli.py +++ b/khard/cli.py @@ -186,9 +186,9 @@ def create_parsers() -> Tuple[argparse.ArgumentParser, list_parser.add_argument( "-p", "--parsable", action="store_true", help="Machine readable format: uid\\tcontact_name\\taddress_book_name") - field_argument = FieldsArgument('index', 'name', 'phone', 'email', - *CarddavObject.get_properties(), - nested=True) + field_argument = FieldsArgument( + 'index', 'name', 'phone', 'email', 'address_book', + *CarddavObject.get_properties(), nested=True) list_parser.add_argument( "-F", "--fields", default=[], type=field_argument, help="Comma separated list of fields to show "