Skip to content

Commit

Permalink
Allow address_book as field for list -F
Browse files Browse the repository at this point in the history
This adds the special field "address_book" to the valid fields that can
be selected with the --format option.

Fix #331.
  • Loading branch information
lucc committed Jan 3, 2024
1 parent e4a3f71 commit 512d8ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions khard/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit 512d8ce

Please sign in to comment.